-
Notifications
You must be signed in to change notification settings - Fork 97
Home
You can (and should) set this up in exactly the same way as laravel. The minimal installation steps for local development are outlined below, and you should consult the Laravel documentation for comprehensive Laravel configuration options.
Note that this boilerplate does not support Lumen.
When setting up the project for the first time, please execute the following commands:
composer install
composer run post-root-package-install
php artisan key:generate
php artisan jwt:secret
php artisan ide-helper:generate
Additionally, please carry out the following steps:
- Remove the composer.lock from the .gitignore file
This boilerplate adds several additional configuration files you should be aware of;
- api.php - Dingo API Configuration
- jwt.php - Tymon JWT Configuration
- stubs.php - This loads custom API stubs for certain artisan generators
It is not necessary to modify them during installation, but you should familiarise yourself with them - just in case you need to change some relevant configurations later.
This boilerplate is essentially a raw installation of Laravel 5, with various customisations.
In order to keep the changes to Laravel itself to a minimum, most heavy lifting is done by the supporting package l5-api. This allows for easier updating and forward compatibility, while minimising clutter in your root repository.
The "l5-api" package has base "restful" elements - such as controllers, models, transformers, middleware, helpers and other things - designed to make Laravel more API-friendly. Meanwhile, changes to the laravel repository ensure these elements are properly used and integrated into Laravel itself.
This table shows you which versions of this boilerplate mirror which versions of Laravel.
Laravel Version | Boilerplate Version | Minimum PHP Version | Support Status |
---|---|---|---|
5.6 | 0.x.x-dev | 7.1 | Unsupported |
5.7 | 0.x.x-dev | 7.1 | Unsupported |
5.8 | 0.1 | 7.1 | Supported |
5.8 | 0.2-dev | 7.1 | In development |
This boilerplate is using Laravel's phpunit testing. You will find API tests in their own directory, and suite. Some tests have been written for the existing endpoints to get you started.
To run tests on the commandline;
composer test
This boilerplate does not aim to be too prescriptive, and almost all classes from the supporting l5-api package exist inside it, already overridden in the boilerplate repository that you start with, and ready for you to customise.