koel/app/Policies/PlaylistPolicy.php
2016-09-26 14:30:00 +08:00

14 lines
223 B
PHP

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