structure base line for application for tax services

This commit is contained in:
2018-11-19 00:46:12 -06:00
parent 84d996ddac
commit 439580b4e1
15 changed files with 252 additions and 82 deletions
+9
View File
@@ -39,6 +39,15 @@ class AuthServiceProvider extends ServiceProvider
}
});
$gate->define('isDirector', function($user) {
$check = DB::table('user_roles')->where('character_id', auth()->user()->character_id)->get(['role']);
if($check[0]->role === 'Director') {
return true;
} else {
return false;
}
});
$gate->define('isUser', function($user) {
$check = DB::table('user_roles')->where('character_id', auth()->user()->character_id)->get(['role']);
if($check[0]->role === 'User') {