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

Questions about using artisan make:model in Laravel5

WBOY
Release: 2016-07-06 13:52:55
Original
1132 people have browsed it

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

<code>php artisan make:model Article
</code>
Copy after login
Copy after login

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>
Copy after login
Copy after login

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

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template