koel/app/Events/SongLikeToggled.php

22 lines
409 B
PHP
Raw Normal View History

2015-12-21 13:49:00 +00:00
<?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();
}
}