/** * Store a newly created branch in storage. * * @return Response */ public function store() { $validator = Validator::make($data = Input::all(), EType::$rules, EType::$messages); if ($validator->fails()) { return Redirect::back()->withErrors($validator)->withInput(); } $etype = new EType(); $etype->employee_type_name = Input::get('name'); $etype->organization_id = '1'; $etype->save(); return Redirect::route('employee_type.index'); }