예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request)
 {
     $search = $request->get('search');
     //$users = User::whereRaw("first_name like '%$search%' or last_name like '%$search%' or username like '%$search%'")->paginate(15);
     $users = User::paginate(15);
     //dd($users);
     return view('admin.users.index', compact('users', $users));
 }
예제 #2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param array $data        	
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }