... ... Gate::define('update-post', function ($user, $post) { return $user->id == $post->user_id; }); ... ...