Laravel Starter API will provide you with the tools for making API's that everyone will love.
- API written in Laravel 5.4
- JSON Web Token (https://github.com/tymondesigns/jwt-auth/tree/develop)
- CORS Middleware (https://github.com/barryvdh/laravel-cors)
- Transformation layer for data output (https://github.com/thephpleague/fractal)
- Clone this repository
$ git clone [email protected]:AgenciaMonk/Laravel-Api-Starter-Kit.git
- Create the env file
$ cp .env.example .env
- Generate a random string with 32 characters for the APP_KEY variable on your .env file.
Using PHP built-in server
- Create the database file
$ touch database/database.sqlite
- Install composer dependencies
$ composer install
- Generate a JWT secret key
$ php artisan jwt:secret
- Migrate the database and run the seeders
$ php artisan migrate --seed
- Start the server
$ php -S localhost:8000 -t public
Using Docker
- Start docker
$ docker-compose up -d
- Uncomment the database variables at the .env file.
- Install composer dependencies
$ docker-compose run app composer install
- Generate a JWT secret key
$ docker-compose run app php artisan jwt:secret
- Migrate the database and run the seeders
$ docker-compose run app php artisan migrate --seed
Visit http://localhost:8000
- Fork it!
- Create your feature branch from master:
$ git checkout -b feature/my-new-feature
- Write your code, comment your code, test your code
- Commit your changes
$ git commit -am 'Add some feature'
- Push to the branch
$ git push origin feature/my-new-feature
- Submit a pull request to master branch
$ composer test
The MIT License (MIT). Please see License File for more information.