12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Providers;
- use App\Repositories\Enums\PermissionEnum;
- use Illuminate\Support\Facades\Gate;
- use Illuminate\Support\ServiceProvider;
- class AuthServiceProvider extends ServiceProvider
- {
-
- public function register()
- {
- }
-
- public function boot()
- {
-
-
-
-
-
- Gate::before(PermissionEnum::gateBeforeCallback());
- $this->app['auth']->provider('custom', function ($app, array $config) {
- return new EloquentUserProvider($app['hash'], $config['model']);
- });
- }
- }
|