Add different PIREP and User events

This commit is contained in:
Nabeel Shahzad
2017-12-02 10:55:17 -06:00
parent d4b66cafae
commit ddcb3c632f
10 changed files with 150 additions and 37 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Events;
use App\Models\Pirep;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
class PirepAccepted
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $pirep;
/**
* Create a new event instance.
*/
public function __construct(Pirep $pirep)
{
//
}
}

20
app/Events/PirepFiled.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
namespace App\Events;
use App\Models\Pirep;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
class PirepFiled
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $pirep;
public function __construct(Pirep $pirep)
{
$this->pirep = $pirep;
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Events;
use App\Models\Pirep;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
class PirepRejected
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $pirep;
public function __construct(Pirep $pirep)
{
$this->pirep = $pirep;
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
class UserAccepted
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
class UserRegistered
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
class UserStateChanged
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
}