rjchauhan/laravel-finer
最新稳定版本:11.2.0
Composer 安装命令:
composer require rjchauhan/laravel-finer
包简介
Laravel multi-purpose helpers
README 文档
README
This package introduces set of multi-purpose helper classes that provides a new way of organising the logic of your Laravel applications.
Installation
You can install the package via composer:
$ composer require rjchauhan/laravel-finer
Usage
Action
Keep your Laravel applications DRY with single action classes.
use Rjchauhan\LaravelFiner\Action\Action; class DeactivateUser extends Action { protected function canBePerformed() { return $this->model->is_active; } protected function perform() { $this->model->is_active = false; $this->model->save(); } }
Usage
class UserActivationController extends Controller { public function deactivate(User $user) { $user = (new DeactivateUser($user))->execute(); return UserResource::make($user); } }
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email Raviraj Chauhan instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 2.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-15