/** * Store the mailing in database * * @return Response */ public function store() { $rules = array('mailing' => 'required'); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { return Redirect::action('TargetController@create')->withErrors($validator); } else { $target = new Target(); $target->importCSV(Input::get('name'), Input::file('mailing')); return View::make('marketing.target.index')->with('success', true)->with('cont', $target->cont); } }
/** * A basic functional test example. * * @data void */ public function testBasicExample() { $target = new Target(); $target->importCSV('shipping.csv'); }