123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App\Listeners;
- use App\Models\Plane;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Queue\InteractsWithQueue;
- class CreateNewPlane
- {
- /**
- * Create the event listener.
- *
- * @return void
- */
- public function __construct()
- {
- //
- }
- /**
- * Handle the event.
- *
- * @param object $event
- * @return void
- */
- public function handle($event)
- {
- Plane::create([
- "model" => "Модель 1",
- "production_date" => "2000-02-02",
- "operating_date" => "2000-02-02",
- "serviceability" => true
- ]);
- Plane::create([
- "model" => "Модель 2",
- "production_date" => "2000-02-02",
- "operating_date" => "2000-02-02",
- "serviceability" => true
- ]);
- Plane::create([
- "model" => "Модель 3",
- "production_date" => "2000-02-02",
- "operating_date" => "2000-02-02",
- "serviceability" => true
- ]);
- }
- }
|