Laravel Resources is a speed-up development package that allows you to create a boilerplate for Laravel apps with a default API structure.
Laravel | Laravel Resources |
---|---|
7.x | v1.7 |
8.x | v2.x |
9.x | v2.x |
10.x | v3.x |
Via Composer
$ composer require tiagomichaelsousa/laravelresources --dev
Create the resources
$ php artisan resources:create <model>
This command will create the Controller, the Request, the Policy, the API Resource and Collection and will also add the default routes for the API.
Publish configuration file
$ php artisan vendor:publish --provider="tiagomichaelsousa\LaravelResources\LaravelResourcesServiceProvider" --tag="config"
Notes:
- This package is fully configurable. You can change all the namespaces for the resources that will be created in the config file.
- Don't forget to edit the request file in order to add your default validation for the model.
- Don't forget to edit the policy file in order to fulfill your app business logic.
Please see the changelog for more information on what has changed recently.
$ composer test
$ composer test-report
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email the author instead of using the issue tracker.
License MIT. Please see the license file for more information.
Please see the code of conduct for more information.
Thanks goes to these wonderful people (emoji key):
Rafael Ferreira 📖 |
tiagomichaelsousa 💻 📖 🖋 👀 |
White Hyena 💻 🖋 |
Keunbae Park 💻 🖋 |
This project follows the all-contributors specification. Contributions of any kind welcome!