. */ namespace App\Policies; use App\Models\Album; use App\Models\User; class AlbumPolicy { public function edit(User $user, Album $album) { return $user->id === $album->user_id || $user->hasRole('admin'); } public function delete(User $user, Album $album) { return $user->id === $album->user_id || $user->hasRole('admin'); } }