Laravel Roles and authentication to routes
问题 I am looking to archive the the following Userlogs in -> Assigned a privilege from the DB -> They can only see allowed routes only So far i have been able to reach here: $user = Usercredential::where('username','=',Auth::user()->username)->get(); foreach ($user as $u ) { $status = $u->userstatus; $userPriv = $u->userpriviledge; if ($status == 0){ Session::put('user_priv',$userPriv); } else{ return Redirect::to_route('home')->with('message','Inactive users cannot login'); } Which checks the