- PHP 8.1
- Laravel 9.x
- Laravel Sanctum Authentication
- Laravel Scribe API Documentation
Frontend features limited to the login page for authenticating access to the API documentation.
If you are running multiple Laravel based microservices using Docker at the same time, you will have to edit docker-compose.yml
to rename services and run each microservice on different port on your localhost. To allow microservices to talk to each other, you also need to configure app shared networks.
cp .env.example .env
APP_ENV=local
DB_DATABASE=api_data
cp .env.example .env.testing
APP_ENV=testing
DB_DATABASE=testing_data
composer install
echo "alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'" >> ~/.zshrc
source ~/.zshrc
sail up -d
sail npm install
Run development mode (This is an API boilerplate, however we need to build assets for Breeze authentication feature used to secure API Documentation)
sail npm run dev
sail artisan migrate --seed
sail artisan migrate --seed --env=testing
sail artisan key:generate
sail artisan storage:link
localhost:8888
localhost:6033
SMTP localhost:1026
HTTP localhost:8026
By default, project uses Scribe to generate API documentation for humans from Laravel codebase.
https://scribe.knuckles.wtf/laravel/
https://github.com/knuckleswtf/scribe/
sail artisan scribe:generate
sail artisan scribe:generate --force
Project uses Laravel IDE Helper Generator that enable your IDE to provide accurate autocompletion.
https://github.com/barryvdh/laravel-ide-helper
sail artisan ide-helper:generate
sail artisan ide-helper:models
Once you generated PHPDoc for the model you may want to add the model to ignored_models
array in config/ide-helper.php
to prevent overriding PHPDoc next time.
'ignored_models' => [
\App\Models\User::class,
],