Skip to content

Instantly share code, notes, and snippets.

@nataliaconde
Last active May 15, 2023 12:33
Embed
What would you like to do?
if (Gate::forUser($user)->allows('can-post', $post)) {
// The user is authorized to update the post…
}
if (Gate::forUser($user)->denies('can-post', $post)) {
// The user cannot update the post…
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment