koel/app/Events/SongStartedPlaying.php

49 lines
759 B
PHP
Raw Normal View History

2015-12-23 06:26:16 +00:00
<?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.
2016-03-06 04:11:28 +00:00
*
2015-12-23 06:26:16 +00:00
* @var Song
*/
public $song;
/**
* The user listening.
2016-03-06 04:11:28 +00:00
*
2015-12-23 06:26:16 +00:00
* @var User
*/
public $user;
/**
* Create a new event instance.
2016-02-03 15:39:15 +00:00
*
* @param Song $song
* @param User $user
2015-12-23 06:26:16 +00:00
*/
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 [];
}
}