Example #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $messages = $this->users->validForCreation(Input::get('first_name'), Input::get('last_name'), Input::get('email'), Input::get('password'));
     if (count($messages) > 0) {
         return Response::json($messages->all(), 400);
     }
     return $this->users->create(Input::get('first_name'), Input::get('last_name'), Input::get('email'), (bool) Input::get('active'), Input::get('password'));
 }
Example #2
0
 /**
  * Add the user and show success!
  *
  * @return Response
  */
 public function postUser()
 {
     $messages = $this->users->validForCreation(Input::get('first_name'), Input::get('last_name'), Input::get('email'), Input::get('password'));
     if (count($messages) > 0) {
         return Redirect::back()->withErrors($messages)->with('install_errors', true);
     }
     $user = $this->users->create(Input::get('first_name'), Input::get('last_name'), Input::get('email'), 1, Input::get('password'));
     return Redirect::to('install/config');
 }