for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Core\Providers;
use Arcanedev\Support\Providers\AuthorizationServiceProvider as ServiceProvider;
use Arcanesoft\Contracts\Auth\Models\User;
use Illuminate\Support\Facades\Gate;
/**
* Class AuthorizationServiceProvider
*
* @package Arcanesoft\Core\Providers
* @author ARCANEDEV <[email protected]>
*/
class AuthorizationServiceProvider extends ServiceProvider
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Register any application authentication / authorization services.
public function boot()
$this->registerPolicies();
Gate::before(function (User $user, $ability) {
$ability
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return $user->isAdmin() ? true : null;
});
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.