GitHub - ibrunotome/laravel-api-templates: A Laravel API starter kit collection...
source link: https://github.com/ibrunotome/laravel-api-templates
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
laravel-api-templates
A Laravel API starter kit collection using different structures. Dockerized with Google App Engine container + swoole.
Features
- 2FA
- ACL
- Anti Phishing Code on email
- Audit
- CORS
- Device authorization
- Etag
- Horizon
- Laravel 5.8
- Login
- Login history
- Multiple localizations, preconfigured with en_US and pt_BR
- Password reset
- Password must not be in one of the 4 million weak passwords
- PHPCS PSR2, phpinsights and sonarqube analysis
- Register
- Swoole
- Tests
- Transactional events: Listen to events and send notifications only if the transaction is commited
- uuid
Soon:
- Job example
- Schedule example
- Websockets example
- Graphql example
Up and running
The container used is created from Google Cloud Platform official php-docker + swoole and can be found here: https://github.com/ibrunotome/docker-laravel-appengine
- Set the .env variables, see .env.example that is already configured to point to pgsql and redis services
- Run the container with
docker-compose up
- Run the migrations with
docker-compose run app bash -c "php artisan migrate:fresh"
And it's up and running :)
The container with xdebug installed is in another Dockerfile, the Dockerfile.testing
, you can get into this container using: docker-compose -f docker-compose.testing.yml run app-tests bash
and then:
- Run tests with
composer test
- Run "lint" (phpcs) with
composer lint
- Run "lint and fix" (phpcbf) with
composer lint:fix
- Run phpcpd with
composer phpcpd
- Run php static analysis (level 5) with
composer static:analysis
- Run nunomaduro/phpinsights with
php artisan insights
To see sonarqube analysis, simple run docker-compose -f docker-compose.sonarqube.yml up
, the quality profile used is PSR-2.
Email layout
Database structure
Routes
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK