mirror of
https://github.com/koel/koel
synced 2024-12-22 02:23:14 +00:00
22 lines
409 B
PHP
22 lines
409 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Events;
|
||
|
|
||
|
use App\Models\Interaction;
|
||
|
use App\Models\User;
|
||
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
||
|
class SongLikeToggled extends Event
|
||
|
{
|
||
|
use SerializesModels;
|
||
|
|
||
|
public $interaction;
|
||
|
public $user;
|
||
|
|
||
|
public function __construct(Interaction $interaction, User $user = null)
|
||
|
{
|
||
|
$this->interaction = $interaction;
|
||
|
$this->user = $user ?: auth()->user();
|
||
|
}
|
||
|
}
|