Skip to content
Max edited this page Jan 30, 2022 · 18 revisions

Boilerplate Structure

This boilerplate is essentially a raw installation of Laravel, 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.

Versions

This table shows you which versions of this boilerplate mirror which versions of Laravel. Note, that this compatibility matrix is mostly for the l5-api package, you should always use the latest tag of this repo when starting your project.

Laravel Version Boilerplate Version Minimum PHP Version Support Status
9.x 4.x.x-dev 8.0 In testing
8.x 3.x.x 7.3 Supported
7.x 2.x.x 7.2.5 Unsupported
6.x 1.1.x 7.2 Unsupported
5.8 1.0.x 7.1 Unsupported
5.8 0.1.x 7.1 Unsupported
5.7 0.x.x-dev 7.1 Unsupported
5.6 0.x.x-dev 7.1 Unsupported

Automated Testing

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

Inheritance architecture

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.