2020-04-26 04:09:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
use App\Http\Controllers\ProfileController;
|
|
|
|
use App\Policies\ProfilePolicy;
|
|
|
|
use App\Policies\UserPolicy;
|
|
|
|
use App\User;
|
2020-04-26 04:09:32 +00:00
|
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
use Illuminate\Support\Facades\Gate;
|
|
|
|
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The policy mappings for the application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $policies = [
|
|
|
|
// 'App\Model' => 'App\Policies\ModelPolicy',
|
2020-06-26 23:32:33 +00:00
|
|
|
'App\Application' => 'App\Policies\ApplicationPolicy',
|
|
|
|
ProfileController::class => ProfilePolicy::class,
|
|
|
|
User::class => UserPolicy::class
|
2020-04-26 04:09:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any authentication / authorization services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
$this->registerPolicies();
|
|
|
|
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|