Exemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @param  string  $role
  * @return Response
  */
 public function indexSort($role)
 {
     $counts = $this->user_gestion->counts();
     $users = $this->user_gestion->index(4, $role);
     $links = $users->setPath('')->render();
     $roles = $this->role_gestion->all();
     return view('back.users.index', compact('users', 'links', 'counts', 'roles'));
 }
Exemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @param  string  $role
  * @param  bool    $ajax
  * @return Response
  */
 private function indexGo($role, $ajax = false)
 {
     $counts = $this->user_gestion->counts();
     $users = $this->user_gestion->index(4, $role);
     $links = str_replace('/?', '?', $users->render());
     $roles = $this->role_gestion->all();
     if ($ajax) {
         return response()->json(['view' => view('back.users.table', compact('users', 'links', 'counts', 'roles'))->render(), 'links' => str_replace('/sort/total', '', $links)]);
     }
     return view('back.users.index', compact('users', 'links', 'counts', 'roles'));
 }