How Laravel Eloquent creates something extra when creating a model
This article mainly shows you "how Laravel Eloquent creates extra things when creating models". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to create extra things when Laravel Eloquent creates models".
Create something extra when you create a model
We all know the Artisan command:
Php artisan make:model Company
But did you know that there are three useful tags that can generate relevant files for the model?
Php artisan make:model Company-mcr
-m will create a migration file
-c will create a controller
-r indicates that the controller should be a resource controller
That's all of the article "how to create extra things when Laravel Eloquent creates a model". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!