コード例 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $data = Input::all();
     $financing = new Financing();
     $financing->name = $data['name'];
     try {
         $financing->save();
     } catch (ValidationException $errors) {
         return Redirect::route('admin.financings.create')->withErrors($errors->getErrors())->withInput();
     }
     return Redirect::route('admin.financings.create')->withErrors(array('mainSuccess' => 'Финансирането е успешно добавен.'));
 }