Authorizing Actions: Intercepting Gate Checks

Gate::before(function ($user, $ability) {
    if ($user->isSuperAdmin()) {
        return true;
    }
});
Gate::after(function ($user, $ability, $result, $arguments) {
    //
});

Authorizing Actions: Intercepting Gate Checks — Structure map

Clickable & Draggable!

Authorizing Actions: Intercepting Gate Checks — Related pages: