承接 patrixsmart/adjustfly 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

patrixsmart/adjustfly

Composer 安装命令:

composer require patrixsmart/adjustfly

包简介

Record Laravel model adjustments during updating event.

README 文档

README

Record Laravel model adjustments during updating event.

Installation

Require the patrixsmart/adjustfly package in your composer.json and update your dependencies:

composer require patrixsmart/adjustfly

Publish Config files

You will need to publish the config file for you to update it details:

php artisan vendor:publish --tag="adjustfly-config"

Migrate

You will need to migrate the adjustments table exposed by Adjustfly:

php artisan migrate

Adjustfly routes

Adjustfly exposes this routes to your application using the following route.

    use Illuminate\Support\Facades\Route;


    /*
    |--------------------------------------------------------------------------
    | Adjustment Routes
    |--------------------------------------------------------------------------
    |
    */
    Route::group([
        'namespace' => 'Patrixsmart\Adjustfly\Http\Controllers',
        'prefix' => 'api'
    ], function () {
        Route::apiResource('adjustments','AdjustmentController')->only(['index','show']);
    });

    /**
     * http://yourdomain.com/adjustments to get all adjustments with pagination
     */

    /**
     * http://yourdomain.com/adjustments/{adjustment_id} to see details of an adjustment made with
     * the current state of the adjustable model.
     */

Adjustfly Usage

Adjustfly requires you use this trait in any model of your app that you wish to track it adjustments during an updating event.

use Patrixsmart\Adjustfly\Traits\HasAdjustments;

class ModelClass extends Model
{
    use HasAdjustments;

    // This exposes this methods to the model
    // ModelClass->recordAdjustment() and ModelClass->adjustments()
}

and use this trait in your User model tosee adjustments made by a particular user.

use Patrixsmart\Adjustfly\Traits\OwnedAdjustments;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use OwnedAdjustments;

    // This exposes this method to the model
    // UserClass->ownedAdjustments()
}

Finally call the recordAdjustment method on the model using the HasAdjustments trait in it static updating or observer updating event method.

Adjustfly Sponsors

We would appreciate your sponsorship for the development of Adjustfly. If you are interested in becoming a sponsor, please contact PatriXsmarT LLC. via package@patrixsmart.com.

Contributing

Thank you for considering contributing to the PatriXsmart Adjustfly!.

Security Vulnerabilities

If you discover a security vulnerability within Adjustfly, please send an e-mail to PatriXsmarT LLC. via package@patrixsmart.com. All security vulnerabilities will be promptly addressed.

License

PatriXsmarT Adjustfly is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固