Created
August 12, 2013 12:29
-
-
Save alloyking/6210411 to your computer and use it in GitHub Desktop.
Laravel controller validator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RegisterController extends BaseController { | |
protected $layout = 'layouts.master'; | |
//post | |
public function post_index(){ | |
$validation = new Services\Validators\Step1; | |
if ($validation->passes()){ | |
$this->create_session_values(Input::all()); | |
$this->save_registration('dealer_user'); | |
} | |
return Redirect::back()->withInput()->withErrors($validation->errors); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment