public function listByPage(Request $request) { $skipNumb = $request->input('s'); $takeNumb = $request->input('t'); $userCollection = \Etherbase\App\User::skip($skipNumb)->take($takeNumb)->get(['id', 'first_name', 'last_name', 'username'])->lists('full_name_and_username', 'id'); $userList = $userCollection->all(); return $userList; }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { $user = User::create(['first_name' => $data['first_name'], 'last_name' => $data['last_name'], 'username' => $data['username'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); Flash::success("Welcome" . $user->first_name . ", your user has been created"); return $user; }