40 lines
846 B
PHP
40 lines
846 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The policy mappings for the application.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $policies = [
|
|
'App\Model' => 'App\Policies\ModelPolicy',
|
|
'App\User' => 'App\Policies\UserPolicy',
|
|
'App\Test' => 'App\Policies\TestPolicy',
|
|
'App\Group' => 'App\Policies\GroupPolicy',
|
|
'App\Question' => 'App\Policies\QuestionPolicy',
|
|
];
|
|
|
|
/**
|
|
* Register any authentication / authorization services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
$this->registerPolicies();
|
|
|
|
//
|
|
}
|
|
|
|
public function getPath()
|
|
{
|
|
return "mod";
|
|
}
|
|
}
|