/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(Request $request) { $this->middleware('isMember'); $a = new Company(); if (!$a->validate(Input::all())) { return redirect('company/create')->withErrors($a->errors())->withInput(); } $a->fill(Input::all()); $a->save(); Flash::success('New company is created'); return Redirect::to('company'); }