<?php

namespace App\Traits;

use App\Scopes\OrderByIdDescScope;
use App\Scopes\OrderByOrderAscScope;
use Illuminate\Database\Eloquent\Builder;

trait OrderByOrderAsc
{
    /**
     * Notes: 初始化trait，自动在模型中，注入作用域
     * 取消排序参考 OrderByIdDesc
     *
     * @Author: <C.Jason>
     * @Date  : 2020/1/19 1:42 下午
     */
    public static function bootOrderByOrderAsc(): void
    {
        static::addGlobalScope(new OrderByOrderAscScope());
    }
}
