movie-night-nuevo/app/Policies/MovieListPolicy.php

26 lines
531 B
PHP
Raw Normal View History

2025-12-30 21:15:42 -06:00
<?php
namespace App\Policies;
use App\Models\MovieList;
use App\Models\User;
class MovieListPolicy
{
/**
* Create a new policy instance.
*/
public function __construct()
{
//
}
public function update(User $user, MovieList $movieList)
{
// If the user is the owner of the movie list or has been added as an editor for
// the movie list, allow them to update it.
return $movieList->owner()->id = $user->id; //|| $movieList->editors->contains($user->id);
}
}