Laravel MongoDB: Delete a table and items manually

環境

Laravel@8.79.0

Jenssegers/mongodb@3.8.4

php artisan tinker

  >>> @tinker session

    // Delete a table

    Schema::connection('mongodb')->drop('TABLE_NAME')

    // Delete items

    DB::connection('mongodb')->table('TABLE_NAME')->truncate()

 

ref:

stackoverflow.com