mirror of
https://github.com/koel/koel
synced 2024-12-21 10:03:10 +00:00
46 lines
704 B
PHP
46 lines
704 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Events;
|
||
|
|
||
|
use App\Models\Song;
|
||
|
use App\Models\User;
|
||
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
||
|
class SongStartedPlaying extends Event
|
||
|
{
|
||
|
use SerializesModels;
|
||
|
|
||
|
/**
|
||
|
* The now playing song.
|
||
|
*
|
||
|
* @var Song
|
||
|
*/
|
||
|
public $song;
|
||
|
|
||
|
/**
|
||
|
* The user listening.
|
||
|
*
|
||
|
* @var User
|
||
|
*/
|
||
|
public $user;
|
||
|
|
||
|
/**
|
||
|
* Create a new event instance.
|
||
|
*/
|
||
|
public function __construct(Song $song, User $user)
|
||
|
{
|
||
|
$this->song = $song;
|
||
|
$this->user = $user;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the channels the event should be broadcast on.
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function broadcastOn()
|
||
|
{
|
||
|
return [];
|
||
|
}
|
||
|
}
|