public function run() { DB::table('stopwords')->delete(); Stopword::create(array('stopword' => 'a')); Stopword::create(array('stopword' => 'an')); Stopword::create(array('stopword' => 'the')); Stopword::create(array('stopword' => 'on')); }
/** * Store a newly created resource in storage. * * @return Response */ public function create() { /* Stopword::create(array( 'stopword' => Input::get('stopword') )); return Response::json(array('success' => true)); */ foreach (explode(",", Input::get("stopword")) as $stopWord) { Stopword::create(array('stopword' => trim($stopWord), 'dataAccount' => (int) Input::get("dataaccountid"))); } //return intval(trim( Input::get("dataaccountid") )); return Response::json(array('success' => true)); }