Skip to content

Instantly share code, notes, and snippets.

@alloyking
Created August 12, 2013 12:29
Show Gist options
  • Save alloyking/6210411 to your computer and use it in GitHub Desktop.
Save alloyking/6210411 to your computer and use it in GitHub Desktop.
Laravel controller validator
<?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