koel/app/Policies/PlaylistPolicy.php
2018-08-29 13:15:23 +07:00

14 lines
229 B
PHP

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