koel/app/Policies/PlaylistPolicy.php
2015-12-14 22:48:48 -02:00

17 lines
303 B
PHP

<?php
namespace App\Policies;
use App\Models\Playlist;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class PlaylistPolicy
{
use HandlesAuthorization;
public function owner(User $user, Playlist $playlist)
{
return $user->id === $playlist->user_id;
}
}