update person on update authorization

This commit is contained in:
Muhammad Fajar
2022-11-07 11:19:19 +07:00
parent 57bbc5df9f
commit 72194d7c42
2 changed files with 69 additions and 62 deletions

View File

@@ -25,6 +25,8 @@ class AuthServiceProvider extends ServiceProvider
{
$this->registerPolicies();
//
Gate::define('update-person', function ($user, $person) {
return $user->id == $person->owner_user_id;
});
}
}