/** * Run the database seeds. * * @return void */ public function run() { Model::unguard(); DB::statement('SET FOREIGN_KEY_CHECKS=0;'); User::truncate(); Post::truncate(); Comment::truncate(); Tag::truncate(); DB::statement('SET FOREIGN_KEY_CHECKS=1;'); $this->call(UserTableSeeder::class); $this->call(PostTableSeeder::class); $this->call(CommentTableSeeder::class); $this->call(TagTableSeeder::class); Model::reguard(); }