A minimal package for shovelling data from an API to clients, for Laravel.
cloudcake/laravel-shovel is a Laravel package for a minimal package for shovelling data from an api to clients, for laravel..
It currently has 96 GitHub stars and 196 downloads on Packagist (latest version v2.1.6).
Install it with composer require cloudcake/laravel-shovel.
Discover more Laravel packages by cloudcake
or browse all Laravel packages to compare alternatives.
Last updated
Laravel Shovel is a minimalist package providing Laravel response macros to assist in rapid API development by transforming models, resources, collections, paginated objects and errors into a concise API response format. DRY.
Install the package via composer.
composer require cloudcake/laravel-shovel
Transform Post::paginate(); into
{
"meta": {
"status": "success",
"message": "OK",
"code": 200,
"pagination": {
"records": 42312,
"page": 1,
"pages": 2821,
"limit": 15
}
},
"data": [{...},{...},{...}]
}
Using regular methods, response(Post::paginate()); or response(Resource::collection(Post::paginate()).
See documentation for more information.
This library is licensed under the MIT License - see the LICENSE.md file for details.