Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
if (Gate::any(['can-post', 'delete-post'], $post)) {
// The user is authorized to update and delete the post…
}
if (Gate::none(['can-post', 'delete-post'], $post)) {
// The user cannot update or delete the post…
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment