Home >Backend Development >PHP Tutorial >Questions about using artisan make:model in Laravel5

Questions about using artisan make:model in Laravel5

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-06 13:52:551164browse

Questions about using artisan make:model in Laravel5
Look at the tutorial and it says

<code>php artisan make:model Article
</code>

Artisan’s make:model method is used here
I can create the corresponding model php file
But
Why is there only the model php file and no database migrations? The
php file for database migration under the file home?

Questions about using artisan make:model in Laravel5
The poster’s operation is as shown below.

Questions about using artisan make:model in Laravel5

Reply content:

Questions about using artisan make:model in Laravel5
Look at the tutorial and it says

<code>php artisan make:model Article
</code>

Artisan’s make:model method is used here
I can create the corresponding model php file
But
Why is there only the model php file and no database migrations? The
php file for database migration under the file home?

Questions about using artisan make:model in Laravel5
The poster’s operation is as shown below.

Questions about using artisan make:model in Laravel5

php artisan make:model Page -m

First php artisan make:migration create_article_table
and then php artisan migrate to generate

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn