joselfonseca / laravel-api
Laravel API starter Kit will give you most of the boilerplate that you need for creating Laravel API's
Installs: 2 464
Dependents: 0
Suggesters: 0
Security: 0
Stars: 407
Watchers: 26
Forks: 116
Open Issues: 1
Language:Blade
Type:project
Requires
- php: ^8.0.2
- guzzlehttp/guzzle: ^7.2
- intervention/image: ^2.7
- intervention/imagecache: ^2.4
- laravel/framework: ^9.19
- laravel/passport: ^10.4
- laravel/socialite: ^5.5
- laravel/tinker: ^2.7
- spatie/laravel-fractal: ^6.0
- spatie/laravel-permission: ^5.5
Requires (Dev)
- brianium/paratest: ^6.2
- fakerphp/faker: ^1.9.1
- laravel/pint: ^1.0
- laravel/sail: ^1.0.1
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^6.1
- phpunit/phpunit: ^9.5.10
- spatie/laravel-ignition: ^1.0
- dev-develop
- V12.0.0
- 11.2.x-dev
- 11.2.2
- 11.2.1
- 11.2.0
- 11.1.0
- 11.0.0
- 10.0.x-dev
- 10.0.1
- 10.0.0
- 9.0.x-dev
- 9.0.0
- 8.0.x-dev
- 8.0.0
- 7.0.x-dev
- 7.0.1
- 7.0.0
- 6.0.x-dev
- 6.0.1
- 6.0.0
- 5.0.x-dev
- 5.0.1
- 5.0.0
- 4.0.x-dev
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.2.0
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.x-dev
- 3.0.1
- 3.0.0
- 2.0.x-dev
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.x-dev
- 1.0.5
- 1.0.4
- 1.0.3
- v1.0.1
- v1.0.0
- dev-dependabot/composer/symfony/http-kernel-6.2.6
This package is auto-updated.
Last update: 2023-02-01 19:26:31 UTC
README
Laravel API starter Kit will provide you with the tools for making API's that everyone will love, API Authentication is already provided with passport.
Here is a list of the packages installed:
Installation
To install the project you can use composer
composer create-project joselfonseca/laravel-api new-api
Modify the .env file to suit your needs
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
When you have the .env with your database connection set up you can run your migrations
php artisan migrate
Then run php artisan passport:install
Run php artisan db:seed
and you should have a new user with the roles and permissions set up
Tests
Navigate to the project root and run vendor/bin/phpunit
after installing all the composer dependencies and after the .env file was created.
API documentation
The project uses API blueprint as API spec and Aglio to render the API docs, please install aglio and merge-apib in your machine and then you can run the following command to compile and render the API docs
composer api-docs
License
The Laravel API Starter kit is open-sourced software licensed under the MIT license