- PHP, MySQL, Redis and Git
install dependencies
$ composer installThen, create a .env file based on .env.example
$ cp .env.example .envset up database
- create a new database
- fill the details in .env file
DB_DATABASE=your_db_name
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password
set up mail account
- use mailtrap.io for local mailing
- set up your smtp account
- get the smtp info and fill the .env file
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_mailtrap_username
MAIL_PASSWORD=your_mailtrap_password
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=example@example.com
MAIL_FROM_NAME="${APP_NAME}"
run migration
$ php artisan migrateIf you want to test with some dummy data expecially for scheduling, jobs, and mail sendiing run seeder
$ php artisan db:seedstart the server
$ php artisan servestart redis server
$ redis-serverstart queue worker
$ php artisan queue:work --queue=default,report-emailsuncomment the command to run the job in the next minute for test purpose instead of weekly in file app\Console\Kernel.php Also stop the scheduler immediately it runs first time to avoid duplicating (because it was set to run every minitue) run scheduler
$ php artisan schedule:runrun the test
$ php artisan test