/** * Store a newly created itemcategory in storage. * * @return Response */ public function store() { $validator = Validator::make($data = Input::all(), Itemcategory::$rules); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } $category = new Itemcategory(); $category->name = Input::get('name'); $category->category = Input::get('category'); $category->save(); return Redirect::route('itemcategories.index'); }