foreach ($tableNames as $name) { //if you don't want to truncate migrations if ($name == 'migrations') { continue; } DB::table($name)->truncate(); }