How to delete a model using php artisan?

前端 未结 6 1570
Happy的楠姐
Happy的楠姐 2021-02-02 06:57

Is there a command to safely delete a model in Laravel 5? To create a model we use

php artisan make:model modelname

And that will create a mode

6条回答
  •  终归单人心
    2021-02-02 07:50

    The problem can also arise when your database name is different from the one defined in .env file.

    DB_DATABASE=laravel
    

    By default, database structure in .env sets database name as laravel. You can replace laravel with the name of your database.

提交回复
热议问题