/** * Store a newly created ad bloxk in storage. * * @return \Illuminate\Http\Response */ public function store() { //Create the validator to process input for validation. $input = $this->purifier->clean(Input::except('_token')); $validator = Validator::make($input, AdBlockValidator::validationRules()); if ($validator->fails()) { return Redirect::to('/admin/ad_block_config')->withErrors($validator)->withInput($input); } $adBlock = new AdBlock(); $adBlock->fill($input); $adBlock->save(); Session::flash('success_message_add', 'The Ad Block has successfully been created and stored!'); return Redirect::to('/admin/ad_block_config'); }