forked from eatvio/eatvio-infra
43 lines
972 B
PHP
43 lines
972 B
PHP
<?php
|
|
|
|
namespace App\Events;
|
|
|
|
use Illuminate\Broadcasting\Channel;
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Broadcasting\PresenceChannel;
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use App\Models\Diet;
|
|
use App\Models\User;
|
|
|
|
class DietSelected
|
|
{
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
public $diet;
|
|
public $user;
|
|
|
|
/**
|
|
* Create a new event instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct(Diet $diet, User $user)
|
|
{
|
|
$this->diet = $diet;
|
|
$this->user = $user;
|
|
}
|
|
|
|
/**
|
|
* Get the channels the event should broadcast on.
|
|
*
|
|
* @return \Illuminate\Broadcasting\Channel|array
|
|
*/
|
|
/* public function broadcastOn() */
|
|
/* { */
|
|
/* return new PrivateChannel('channel-name'); */
|
|
/* } */
|
|
}
|