weward/laramacro
最新稳定版本:v10.0.1
Composer 安装命令:
composer require weward/laramacro
包简介
A set of custom macros for Laravel
关键字:
README 文档
README
A set of custom macros for Laravel
Table of Contents
Installation
You can install the package via composer:
# for the meantime
composer require weward/laramacro:dev-master
Publish Service Provider
php artisan vendor:publish --tag=laramacro-providers
You may register the service srovider at config/app.php
'providers' => [ // ... App\Providers\LaraMacroServiceProvider::class, ]
Usage
Response Macro
jsonApi()
A superset of ->json() response format that can accept Laravel Resource payload.
// Pass normal payload and http status return response()->jsonApi($data, 200); // Pass a Resource and hhtp status return response()->jsonApi(new UserResource($data), 200);
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-23