/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request)
 {
     if ($request->input('q')) {
     }
     $users = User::paginate(50);
     return view('admin.users.index', compact('users'));
 }
Example #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (Request::get('filter')) {
         $records = User::where('title', 'LIKE', '%' . Request::get('filter') . '%')->paginate(10);
     } else {
         $records = User::paginate(10);
     }
     return view('back.scope.system.users.index', compact('records'));
 }
Example #3
0
 public function index($request, $response, $args)
 {
     $pageNum = 1;
     if (isset($request->getQueryParams()["page"])) {
         $pageNum = $request->getQueryParams()["page"];
     }
     $users = User::paginate(15, ['*'], 'page', $pageNum);
     $users->setPath('/admin/user');
     return $this->view()->assign('users', $users)->display('admin/user/index.tpl');
 }
Example #4
0
 /**
  * Get a cached paginated result
  *
  * @param $perPage
  * @return mixed
  */
 public function getPaginated($perPage)
 {
     $page = Request::get('page');
     if (!$page) {
         $page = 0;
     }
     $cacheKey = 'laradmin_users_page' . $page;
     return Cache::tags('laradmin_users')->remember($cacheKey, 60, function () use($perPage) {
         return User::paginate($perPage);
     });
 }
 public function index(Request $request)
 {
     $users = User::paginate(10);
     $roles = DB::table('roles')->lists('role_name', 'id');
     $viewData = array('users' => $users, 'roles' => $roles);
     $userId = $request->get('id');
     $action = $request->get('action');
     if ($action == 'delete') {
         return $this->delete($userId);
     }
     if ($action == 'accept') {
         return $this->accept($userId);
     }
     if ($userId) {
         $user = User::find($userId);
         $viewData['user'] = $user;
     }
     return view('admin.user', $viewData);
 }
Example #6
0
 /**
  * Show the admin panel, and process admin AJAX requests.
  *
  * @return Response
  */
 public function displayAdminPage(Request $request)
 {
     if (!$this->isLoggedIn()) {
         return abort(404);
     }
     $username = session('username');
     $role = session('role');
     $admin_users = null;
     $admin_links = null;
     if ($this->currIsAdmin()) {
         $admin_users = User::paginate(15);
         $admin_links = Link::paginate(15);
     }
     $user = UserHelper::getUserByUsername($username);
     if (!$user) {
         return redirect(route('index'))->with('error', 'Invalid or disabled account.');
     }
     $user_links = Link::where('creator', $username)->paginate(15);
     return view('admin', ['role' => $role, 'admin_users' => $admin_users, 'admin_links' => $admin_links, 'user_links' => $user_links, 'api_key' => $user->api_key, 'api_active' => $user->api_active, 'api_quota' => $user->api_quota]);
 }
Example #7
0
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  *	- or -
  * 		http://example.com/index.php/welcome/index
  *	- or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  *
  * @see https://codeigniter.com/user_guide/general/urls.html
  */
 public function index()
 {
     User::create(['name' => 'test' . uniqid(), 'email' => 'test' . uniqid() . '@test.com', 'password' => md5('test' . uniqid())]);
     $users = User::paginate(5);
     $this->output->set_output(View::make('users', compact('users')));
 }
Example #8
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $users = User::paginate(10);
     return view('admin.users.index', compact('users'));
 }
Example #9
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return User::paginate(10);
 }
Example #10
0
 public function getManage()
 {
     $this->middleware('admin');
     $users = User::paginate(20);
     return view('admin.users.manage', ['pageInfo' => ['siteTitle' => 'Manage Users', 'pageHeading' => 'Manage Users', 'pageHeadingSlogan' => 'Here the section to manage all registered users'], 'data' => ['users' => $users]]);
 }
Example #11
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return view('admin.users.list', array('data' => User::paginate(10)));
 }
Example #12
0
 public function listing($page, $limit)
 {
     $response = array('data' => array(), 'paginator' => '');
     if (!empty($limit)) {
         $users = User::paginate($limit);
     } else {
         $users = User::where('id', '>', '0')->get();
     }
     if (!empty($users)) {
         foreach ($users as $key => $user) {
             $response['data'][] = $this->get($user->id, false);
         }
     }
     if (!empty($limit)) {
         $response = Utility::paginator($response, $users, $limit);
     }
     return $response;
 }
 /**
  * @api {get} /users 用户列表
  * @apiDescription 当前用户信息
  * @apiGroup user
  * @apiPermission none
  * @apiVersion 0.1.0
  * @apiSuccessExample {json} Success-Response:
  *     HTTP/1.1 200 OK
  *     {
  *       "data": [
  *         {
  *           "id": 2,
  *           "email": "*****@*****.**",
  *           "name": "fff",
  *           "created_at": "2015-11-12 10:37:14",
  *           "updated_at": "2015-11-13 02:26:36",
  *           "deleted_at": null
  *         }
  *       ],
  *       "meta": {
  *         "pagination": {
  *           "total": 1,
  *           "count": 1,
  *           "per_page": 15,
  *           "current_page": 1,
  *           "total_pages": 1,
  *           "links": []
  *         }
  *       }
  *     }
  */
 public function index()
 {
     $users = User::paginate();
     return $this->response->paginator($users, new UserTransformer());
 }
 public function index()
 {
     $system_users = User::paginate(Config('constants.paginateNo'));
     $roles = Role::get(['id', 'name'])->toArray();
     return view(Config('constants.adminSystemUsersView') . '.index', compact('system_users', 'roles'));
 }
Example #15
0
 public function users()
 {
     $users = User::paginate(10);
     return view('users', array('users' => $users));
 }
 public function index()
 {
     $usuarios = User::paginate(2);
     return view('admin.users.index')->with('users', $usuarios);
 }
Example #17
0
 /**
  * List all users
  *
  * @return response
  */
 public function index()
 {
     $users = User::paginate(config('back.default_pagination'));
     return view('backend::user.index', ['users' => $users, 'avatar_path' => config('back.avatar_path')]);
 }
Example #18
0
 public function getIndex()
 {
     $users = User::paginate(10);
     return View('admin.index', ['users' => $users]);
 }
Example #19
0
 public function getUsersPaginated()
 {
     return User::paginate(10);
 }
 public function users()
 {
     $users = User::paginate(20);
     return View::make('users', compact('users'));
 }
Example #21
0
 public function index()
 {
     $users = User::paginate(15);
     return view('dashboard.user.index', compact('users'));
 }
 /**
  * @param $limit
  *
  * @return mixed
  */
 public function getPaginated($limit)
 {
     return User::paginate($limit);
 }