/** * Run the database seeds. * * @return void */ public function run() { DB::table('faq_tags')->delete(); for ($i = 0; $i < 30; $i++) { $random_faq = Faq::orderByRaw("RAND()")->first(); FaqTag::create(['faq_id' => $random_faq->id, 'tag_en' => 'en_tag_' . $i, 'tag_nl' => 'nl_tag_' . $i]); } }