An awesome boilerplate for your next Laravel 9 based API. It's only goal is to simply kick-start your API development and provide you with some of the best practices when building amazing and scalable REST APIs π₯
We baked in all the best REST API practices in terms of structuring your API, naming conversations, HTTP methods, responses and optimizations
We all like to learn by examples and that's why the boilerplate comes with a concrete example that include everything from folder structure, routes to naming controllers
Tired of manually creating controllers, resources, test and form requests each time for new API endpoints. We were too. That's why we added a command that does all of that for you. Just run php artisan treblle:make
and you get everything you need in a second
Building a versioning system that scales is always hard and that's why we built in a robust versioning system that is easy to use and can grow with the project
The boilerplate uses single responsibility controllers that make it painfully obvious what's going on and can be used with different versions
We built two tables Users and Posts and defined everything you might need on a database and model level
Built in Laravel Sanctum authentication included in the boilerplate.
Want to use UUIDs but find it to much work just use our built in InteractsWithUuid
trait and have fun with UUIDs
Easily create a new user without messing around with database clients or CRUD systems by using our custom command php artisan user:create
We added an awesome Laravel package called Treblle. Out of the box Treblle gives you: real-time API monitoring, automatically generated and updated documentation, error tracking and logging, API analytics, quality scoring and much more. To get started with Treblle just run php artisan treblle:start
and follow the instructions or visit treblle.com for more information
- PHP 8.1+
- Laravel 9+
Press the Use this template
button at the top of this repository to create a new API with this boilerplate and π.
The boilerplate was built by Maurizio, with some help from cindreta and sponsored by Treblle. We would love to have you as our contributor so please feel free to make pull requests and help us make the best API boilerplate on Github πͺπ»
Grab a free copy of The 10 REST Commandments e-book and learn how to build great REST APIs that scale in any language π https://treblle.com/ebooks/the-10-rest-commandments
If you have problems of any kind feel free to reach out via https://treblle.com or email [email protected], and we'll do our best to help you out.
Copyright 2022, Treblle Limited. Licensed under the MIT license: https://www.opensource.org/licenses/mit-license.php