예제 #1
0
 /**
  * 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);
     }
 }
예제 #2
0
 /**
  * A basic functional test example.
  *
  * @data void
  */
 public function testBasicExample()
 {
     $target = new Target();
     $target->importCSV('shipping.csv');
 }