laravel-12-and-nuxt-template-description
This repo can be used to scaffold a new Laravel project. Follow these steps to get started:
- Press the
Use templatebutton at the top of this repo to create a new repo with the contents of this skeleton. - Run
php init.phpto run a script that will replace all placeholders throughout all the files. It also create a.envfile. - Have fun with your new Laravel project.
Laravel template to boot a fresh new Laravel project in seconds.
ddev startddev composer installThe project uses two database:
- For
localenvironment:db - For
testingenvironment:db_test
Migrations on db_test are not required since RefreshDatabase trait is used.
See Resetting The Database After Each Test
for more information.
ddev php artisan migrateddev php artisan db:seedTo set up a fresh version of database and run seeders at the same time:
ddev php artisan migrate:fresh --seedRun checks prior to commit
ddev composer test-styleFix style in project with PHP CS Fixer:
ddev exec ./vendor/bin/php-cs-fixer fixFix style in project with PHP Code Beautifier and Fixer :
ddev exec ./vendor/bin/phpcbfTo run Php Insights with verbose output:
ddev exec ./vendor/bin/phpinsights -vRun tests with:
ddev php artisan testor:
ddev exec ./vendor/bin/phpunitRun tests coverage with:
ddev xdebugand:
ddev exec XDEBUG_MODE=coverage php artisan testReports are in public/coverage and visible at
https://laravel-12-and-nuxt-template.ddev.site/coverage
By defaults, queues are sync:
QUEUE_CONNECTION=syncIt's possibile to set the async with:
QUEUE_CONNECTION=redisRedis is used as message queues manager.
ddev php artisan queue:workDuring tests, queues are sync since in phpunit.xml there is:
<server name="QUEUE_CONNECTION" value="sync"/>