Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Stopword::destroy($id);
     return Response::json(array('success' => true));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     // Delete the data account and all data associated with it
     $lp = DataAccount::find($id)->landingPageUrls()->get();
     // Laravel's magic
     foreach ($lp as $v) {
         DB::table('landingpagewordcloud')->where('landing_page_urls_id', $v->id)->delete();
     }
     DataAccount::find($id)->landingPageUrls()->delete();
     DataAccount::destroy($id);
     Keyword::where('dataAccount', $id)->delete();
     Stopword::where('dataAccount', $id)->delete();
     Negativekeyword::where('dataAccount', $id)->delete();
     DB::table('keywords_segment')->where('dataAccount', $id)->delete();
     DB::table('segmentmap')->where('dataAccount', $id)->delete();
     DB::table('wordcloud')->where('dataAccount', $id)->delete();
     //DB::statement( 'drop database data_' . $id );
     return Response::json(array('success' => true));
 }