예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     if (Gate::denies('view-users')) {
         abort(403, 'Nope');
     }
     $users = User::all();
     return view('user.index', compact('users'));
 }
예제 #2
0
 /**
  * userList.
  *
  * TODO: set pagination to the view.
  *
  * Get the user list of the system.
  */
 public function userList()
 {
     if (!Auth::user()->is('admin') || Auth::user()->is('developer')) {
         return Redirect::route('trips.index', ['selector' => 'all']);
     }
     $data['title'] = trans('sfa.titleUserControl');
     $data['users'] = User::paginate(15);
     // User count.
     $data['all'] = count(User::all());
     $data['active'] = count(User::where('status', 0)->get());
     $data['blocked'] = count(User::where('status', 1)->get());
     return view('backend.userControl', $data);
 }
 public function getAjaxListUser()
 {
     $user = User::all();
     return Datatables::of($user)->addColumn('email', function ($user) {
         return $user['personil']['email'];
     })->addColumn('nama_personil', function ($user) {
         return $user['personil']['nama_personil'];
     })->addColumn('action', function ($user) {
         $edit_b = '<div class="btn-group"><a href="' . route('edit-user') . '/' . $user->id . '" class="btn btn-xs btn-default"><i class="glyphicon glyphicon-edit"></i></a> ';
         if ($user['status'] === 'A') {
             $status_b = '<a href="' . route('delete-user') . '/' . $user->id . '/A" class="btn btn-xs btn-danger"><i class="glyphicon glyphicon-remove"></i></a></div>';
         } else {
             $status_b = '<a href="' . route('delete-user') . '/' . $user->id . '/N" class="btn btn-xs btn-info"><i class="glyphicon glyphicon-ok   "></i></a></div>';
         }
         return $edit_b . $status_b;
     })->make(true);
 }
예제 #4
0
 public function index()
 {
     $users = User::all();
     return view('users.index', ['users' => $users]);
 }
예제 #5
0
 public function forumUserView($Username)
 {
     //SELECT * FROM subjects INNER JOIN users ON subjects.subjects_username COLLATE utf8_general_ci = users.username COLLATE utf8_general_ci;
     $getUser = User::all()->where('username', '=', $Username);
     $getuserForum = DB::connection('mysql')->table('subjects')->join('postsubject', 'subjects_id', '=', 'post_subject_id')->where('subjects_username', '=', $Username)->get();
     return View('Runningshoes.pages.forum.User')->with(array('getuserForum' => $getuserForum, 'getUser' => $getUser));
 }
예제 #6
0
 public function index()
 {
     $users = User::all();
     return View::make('user.index', ['users' => $users]);
 }
예제 #7
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     dd(User::all());
     //
 }
예제 #8
0
 public function index()
 {
     // Retrieve all the users in the database and return them
     $users = User::all();
     return $users;
 }
예제 #9
0
 /**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // dd("user controller");
     $users = User::all();
     return view('users', compact('users'));
 }
예제 #10
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function Index()
 {
     $user = User::all();
     return view('user.index')->with('users', $user);
 }
예제 #11
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $users = User::all();
     return view('edit', ['usuarios' => $users]);
     //
 }