Exemplo n.º 1
0
 public function getEdit($id)
 {
     if (\Auth::user()->id_user == $id || \Auth::user()->permission < 2) {
         return redirect('/');
     }
     $user = User::find($id);
     $levels = data_level_user::whereStatus(1)->get();
     $levelss = [];
     foreach (data_level::whereId_user($id)->get() as $val) {
         $levelss[] = $val->id_level_user;
     }
     return view('Users.EditUser', ['user' => $user, 'levels' => $levels, 'lev' => $levelss]);
 }
Exemplo n.º 2
0
 public function getAccess($id = 0)
 {
     return view('Menus.Access', ['level' => data_level_user::whereStatus(1)->get(), 'id' => $id]);
 }