123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App\Listeners;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Queue\InteractsWithQueue;
- use App\Models\Task;
- class CreateExampleTasks
- {
- /**
- * Create the event listener.
- *
- * @return void
- */
- public function __construct()
- {
- //
- }
- /**
- * Handle the event.
- *
- * @param object $event
- * @return void
- */
- public function handle($event)
- {
- Task::create([
- "name" => "Встреча у начальника",
- "type_id" => 1,
- "place" => "Работа",
- "date" => now()->format("d.m.Y"),
- "time" => "12:00",
- "duration" => "01:00",
- "comment" => "Важно!!"
- ]);
- Task::create([
- "name" => "Мероприятие",
- "type_id" => 2,
- "place" => "Иркутск",
- "date" => now()->format("d.m.Y"),
- "time" => "13:00",
- "duration" => "01:00",
- "comment" => "Надо быть!"
- ]);
- }
- }
|