23 lines
540 B
PHP
23 lines
540 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Auth\CrmUserProvider;
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any authentication / authorization services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
$this->app->auth->provider('crm', function ($app, array $config) {
|
|
return new CrmUserProvider($app['hash'], $config['model']);
|
|
});
|
|
|
|
$this->registerPolicies();
|
|
}
|
|
}
|