Go to file
Константин 536c1f2ea3 minor update 2023-08-11 11:18:16 +03:00
app minor fix 2023-08-10 18:23:26 +03:00
bin init 2023-05-29 18:05:09 +03:00
bootstrap init 2023-05-29 18:05:09 +03:00
config message 2023-07-14 14:32:18 +03:00
database minor update 2023-08-11 11:18:16 +03:00
docs/api init 2023-05-29 18:05:09 +03:00
public init 2023-05-29 18:05:09 +03:00
resources many updates 2023-08-07 21:00:04 +03:00
routes routes updated 2023-08-11 02:04:19 +03:00
storage companies and advisories modules added 2023-07-31 12:39:47 +03:00
tests init 2023-05-29 18:05:09 +03:00
.dockerignore init 2023-05-29 18:05:09 +03:00
.env.example init 2023-05-29 18:05:09 +03:00
.gitattributes init 2023-05-29 18:05:09 +03:00
.gitignore init 2023-05-29 18:05:09 +03:00
.php_cs.dist init 2023-05-29 18:05:09 +03:00
.rnd init 2023-05-29 18:05:09 +03:00
CODE_OF_CONDUCT.md init 2023-05-29 18:05:09 +03:00
CONTRIBUTING.md init 2023-05-29 18:05:09 +03:00
Dockerfile init 2023-05-29 18:05:09 +03:00
LICENSE init 2023-05-29 18:05:09 +03:00
artisan init 2023-05-29 18:05:09 +03:00
composer.json init 2023-05-29 18:05:09 +03:00
composer.lock init 2023-05-29 18:05:09 +03:00
composer.phar init 2023-05-29 18:05:09 +03:00
docker-compose.yml init 2023-05-29 18:05:09 +03:00
phpunit.xml init 2023-05-29 18:05:09 +03:00
readme.md init 2023-05-29 18:05:09 +03:00
server.php init 2023-05-29 18:05:09 +03:00

readme.md

Laravel API Starter Kit

Total Downloads License

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