📅  最后修改于: 2022-03-11 14:54:52.498000             🧑  作者: Mango
// in AuthServiceProvider's boot method
Gate::define('update-post', function (User $user, Post $post) {
return $user->id === $post->user_id;
});