stephenlake/laravel-shovel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stephenlake/laravel-shovel

最新稳定版本:v2.1.6

Composer 安装命令:

composer require stephenlake/laravel-shovel

包简介

A minimal package for shovelling data from an API to clients, for Laravel.

README 文档

README

downloads license

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.

Getting Started

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.

License

This library is licensed under the MIT License - see the LICENSE.md file for details.

统计信息

  • 总下载量: 3.35k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 96
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 96
  • Watchers: 5
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-18