Initial Commit

This commit is contained in:
2018-10-15 00:37:28 -05:00
commit b0bd5569c0
7508 changed files with 849336 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
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',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot(GateContract $gate)
{
$this->registerPolicies($gate);
$gate->define('isAdmin', function($user) {
return $user->user_type == 'Admin';
});
$gate->define('isW4RP', function($user) {
return $user->user_type == 'W4RP';
});
$gate->define('isLegacy', function($user) {
return $user->user_type == 'Legacy';
});
$gate->define('isGuest', function($user) {
return $user->user_type == 'Guest';
});
}
}