LaravelPackages.net
Acme Inc.
Toggle sidebar
dynamics-unlimited/laravel-api-template

Generic API template for Kairnial projects.

26
0
1.0.1
About dynamics-unlimited/laravel-api-template

dynamics-unlimited/laravel-api-template is a Laravel package for generic api template for kairnial projects.. It currently has 0 GitHub stars and 26 downloads on Packagist (latest version 1.0.1). Install it with composer require dynamics-unlimited/laravel-api-template. Discover more Laravel packages by dynamics-unlimited or browse all Laravel packages to compare alternatives.

Last updated

Notifications preferences micro-service

Installation

  • Install the WSL with UbuntuV22.04
  • If Postgresql and its php drivers are not installed in the WSL, install them
  • Create a new Postgresql database using the init-db.sh script (adjust the user and database name inside)
  • From your Ubuntu terminal, navigate to the root of the project, and execute
composer install
  • Then execute the database's migrations
php artisan migrate
  • To add some test data to your database, execute
php artisan db:seed

Creating a project from this template

Use composer to create a new project based on this template using:

composer create-project dynamics-unlimited/laravel-api-template <local-directory>

Environment variables

Copy/paste .env.example then rename the new file into '.env'. Update the content of the file according to your environment.

JWT key

Copy the public key for the appropriate environment to storage/app/keys/public (public being a file).

Api documentation

To generate the api documentation use:

php artisan l5-swagger:generate

The swagger documentation is accessible using this route {{url}}/api/documentation

The redoc documentation is accessible using this route {{url}}/api/redoc

Notes for deploy

Execute the following command:

php artisan l5-swagger:generate

Star History Chart