2021-02-11 11:24:44 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
2023-08-21 15:24:32 +02:00
|
|
|
use App\Auth\CrmUserProvider;
|
2021-02-11 11:24:44 +01:00
|
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Register any authentication / authorization services.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function boot()
|
|
|
|
|
{
|
2023-08-21 15:24:32 +02:00
|
|
|
$this->app->auth->provider('crm', function ($app, array $config) {
|
|
|
|
|
return new CrmUserProvider($app['hash'], $config['model']);
|
|
|
|
|
});
|
2021-02-11 11:24:44 +01:00
|
|
|
|
2023-08-21 15:24:32 +02:00
|
|
|
$this->registerPolicies();
|
2021-02-11 11:24:44 +01:00
|
|
|
}
|
|
|
|
|
}
|