定制 rjchauhan/laravel-finer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

rjchauhan/laravel-finer

最新稳定版本:11.2.0

Composer 安装命令:

composer require rjchauhan/laravel-finer

包简介

Laravel multi-purpose helpers

README 文档

README

Latest Version on Packagist Total Downloads

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.53k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-15