public function createItem() { $sname = Input::get('subcategory_id'); $subname = ItemSubcategory::where('name', $sname)->first(); $item = new Item(); $item_params = array_merge(Input::only(['code', 'sku', 'generic', 'brand', 'make', 'model', 'color', 'description', 'category_id', 'uom_id', 'inventory_types_id']), ['size_dim' => Input::get('size_dimension'), 'gauge_thick' => Input::get('gauge_thickness'), 'reorder_lvl' => Input::get('reoderlevel'), 'subcategory_id' => $subname->id, 'inventory_types_id' => Input::get('inventory_types')]); $item->fill($item_params); $item->save(); return redirect()->action('Operations\\ItemController@displayItems')->with('message', 'Item Successfully Added.'); }