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

GitHub 信息

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

其他信息

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