/** * Display a listing of the resource. * * @return Response */ public function index() { $title = 'Danh sách tài khoản'; $data = UserModel::all(); //paginate(5); return view('user.index')->with('title', $title)->with('data', $data); }
/** * [home description] * @return [type] [description] */ public function home() { if (Auth::check()) { $user = Auth::user(); $users = UserModel::all(); return view('users.home', compact('users', 'user')); } else { return redirect('/')->with('flash_error', 'Unauthorized Access..')->withInput(); } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $users = UserModel::all(); return view('admin.userList', ['users' => $users]); }
/** * Show all of the users for the application. * * @return Response */ public function index() { $users = UserModel::all(); return $users; }
public function getUserTable() { $sites = UserModel::all(); $results = array(); foreach ($sites as $site) { array_push($results, array($site->rank, $site->name)); } return response()->json($results); }