Category: Laravel

A few weeks ago, the creator of Laravel, Taylor Otwell made a poll asking the framework’s users how they arrange their model files in the app folder. To create a model the default way, you can run this command below in the terminal: php artisan make:model Bank This command will create a new Bank model class and put the file directly in the app folder.

The ModelMakeClass becomes: The final thing to add to the new command class we just created is the logic to make our folder the default folder to put model files, in my case the Models folder. Our new command class now becomes: Finally, running the artisan command to create a new model will put the models in the app\Models folder by default 🙂.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners