I am using Laravel 5.1. Generally to generate jobs I do php artisan make:job SomeJobName
. This would basically create a SomeJobName
job in the app/Jobs
directory. But what if my application is huge. I would end up having a lot of files in that folder. I want to organize it a little. I want to make sub directories like:
app/Jobs/Users/
Store.php
Update.php
Delete.php
app/Jobs/Posts
Store.php
Update.php
Delete.php
What is the recommended approach to accomplish this?
artisan make:*
commands will accept a relative namespace so you can do something like this:
php artisan make:job Users/Store
You don't even need to create the sub-directories as artisan will create them if they don't exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With