/** * Store a newly created img in storage. * * @return Response */ public function store() { $validator = Validator::make($data = Input::all(), Img::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } Img::create($data); return Redirect::route('imgs.index'); }