Skip to content

Releases: jiannei/laravel-response

v3.0.1

20 Sep 08:01
Compare
Choose a tag to compare
fix: 异常提示

v2.0.1

20 Sep 08:00
Compare
Choose a tag to compare
fix: 异常提示

v1.8.1

20 Sep 08:00
Compare
Choose a tag to compare
fix: 异常提示

v4.0.0

19 Sep 16:38
Compare
Choose a tag to compare

完善了一些功能,并且支持了更多 Laravel 版本 🎉 🎉 🎉

Feature

  • [变更]:data 中包含多条数据返回时,原先的配置项 format.paginated_resource.data_field变更为format.fields.data.fields.data.alias
  • [新增]:新的文档站点 -> https://docs.sinan.fun/packages/laravel-response.html ❤️
  • [新增]:返回数据结构中的全部字段 status、code、message、error、data,以及 data 里面包含的 data 和 meta 中的 pagination 字段,名称都支持别名方式修改,或设置隐藏不返回。
  • [新增]:成功状态返回 增加 ok 方法,可以方便 success 方法中 data 必须传空的场景。#31e840b3f
  • [新增]:可以通过配置exception项,来覆盖异常默认的 code和message。比如,将\Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class异常的 message 设置为空字符串,来避免暴露数据模型信息。 #27
  • [新增]:同时支持 laravel 5.5、laravel 6.x、laravel 7.x,以及最新的 laravel 8.x ☺️
# laravel 5.5

composer require jiannei/laravel-response "~1.8" -vvv
composer require jiannei/laravel-enum "~1.4" -vvv # 可选

# laravel 6.x

composer require jiannei/laravel-response "^2.0" -vvv
composer require jiannei/laravel-enum "~1.4" -vvv # 可选

# laravel 7.x

composer require jiannei/laravel-response "^3.0" -vvv
composer require jiannei/laravel-enum "^2.0" -vvv # 可选

# laravel 8.x

composer require jiannei/laravel-response "^4.0" -vvv
composer require jiannei/laravel-enum "^3.0" -vvv # 可选

v3.0.0

19 Sep 16:04
Compare
Choose a tag to compare

向下兼容 laravel 7.x

v2.0.0

19 Sep 15:52
Compare
Choose a tag to compare

向下兼容 laravel 6.x

v1.8.0

19 Sep 15:51
Compare
Choose a tag to compare

向下兼容 laravel 5.5

1.7.0

16 Aug 02:24
Compare
Choose a tag to compare

分页数据返回固定结构,无数据时返0

1.6.2

22 Apr 07:42
Compare
Choose a tag to compare
Always include 'links' in PaginatedResponse

When working with PaginatedResponse, i feel it hard to check we have next page or not

1.6.1

16 Apr 01:52
Compare
Choose a tag to compare
fix: Failed Authentication Response