1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Providers/AuthServiceProvider.php

34 lines
755 B
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
2018-10-04 19:10:43 +02:00
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Auth;
2018-10-04 19:10:43 +02:00
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
Auth::provider('multidb', function ($app, array $config) {
return new MultiDatabaseUserProvider($this->app['db']->connection(), $this->app['hash']);
});
2018-10-04 19:10:43 +02:00
}
}