cleaniquecoders/laravel-contract
最新稳定版本:1.4.0
Composer 安装命令:
composer require cleaniquecoders/laravel-contract
包简介
Common Contracts for Laravel
README 文档
README
A simple package to handle common contracts.
Installation
You can install the package via composer:
composer require cleaniquecoders/laravel-contract
Usage
php artisan make:contract Action
The command will generate the contract:
<?php namespace App\Contracts; interface Action { }
Available contracts in this package:
CleaniqueCoders/LaravelContract/Contracts/Api
This allow standard form of getting the API response structure. However, you don't need to use this if using Pagination.
return response()->json( $api->getApiResponse(request()), $api->getCode() );
CleaniqueCoders/LaravelContract/Contracts/Builder
This contract allow you to build objects more consistent. $wall->build(), $door->build().
For your reference: Builder
CleaniqueCoders/LaravelContract/Contracts/Execute
Execute contract allow you to consistently call $object->execute(). This contract usually use when we are triggering something to be execute after preparing the object.
CleaniqueCoders/LaravelContract/Contracts/Menu
Menu contract simpley return a list of menus that you can use to build your Sidebar, Navbar, etc.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 3.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-03