Esempio n. 1
0
 public function isAdmin()
 {
     $role = \App\userRole::where('userID', $this->id)->get()->pluck('role')->toArray()[0];
     if ($role == 'admin') {
         return true;
     } else {
         return false;
     }
 }