Пример #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $input = Input::all();
     $validation = Validator::make($input, Terminal::$rules);
     if ($validation->passes()) {
         $this->terminal->create($input);
         return Redirect::route('terminals.index');
     }
     return Redirect::route('terminals.create')->withInput()->withErrors($validation)->with('message', 'There were validation errors.');
 }