Simple project to display and manage the Root Club price list.
ddev start
ddev composer install
The project uses two database:
- For
local
environment:db
- For
testing
environment:db_test
Migrations on db_test
are not required since LazilyRefreshDatabase
trait is used.
See Resetting The Database After Each Test
for more information.
ddev exec php artisan migrate
ddev exec php artisan db:seed
To set up a fresh version of database and run seeders at the same time:
ddev exec php artisan migrate:fresh --seed
Run checks prior to commit
ddev exec tools/static-analysis.sh
Fix style in project with PHP CS Fixer:
ddev exec tools/fix-style.sh
To run Php Insights with verbose output:
ddev exec ./vendor/bin/phpinsights -v
Run tests with:
ddev exec vendor/bin/pest
Run tests coverage with:
ddev xdebug
and:
ddev exec XDEBUG_MODE=coverage vendor/bin/pest --coverage
By defaults, queues are sync:
QUEUE_CONNECTION=sync
It's possible to set the async with:
QUEUE_CONNECTION=redis
Redis is used as message queues manager.
ddev exec php artisan queue:work
During tests, queues are sync since in .env.testing
there is:
QUEUE_CONNECTION=sync