/**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * [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();
     }
 }
Ejemplo n.º 3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $users = UserModel::all();
     return view('admin.userList', ['users' => $users]);
 }
Ejemplo n.º 4
0
 /**
 * Show all of the users for the application.
 *
 * @return Response
 */
 public function index()
 {
     $users = UserModel::all();
     return $users;
 }
Ejemplo n.º 5
0
 public function getUserTable()
 {
     $sites = UserModel::all();
     $results = array();
     foreach ($sites as $site) {
         array_push($results, array($site->rank, $site->name));
     }
     return response()->json($results);
 }