protected static function bootOrderableModel()
    {
        static::creating(function (Model $row) {
            $row->updateOrderFieldOnCreate();
        });

        static::deleted(function (Model $row) {
            $row->updateOrderFieldOnDelete();
        });

        if (in_array("Illuminate\Database\Eloquent\SoftDeletes", trait_uses_recursive(new static()))) {
            static::restoring(function (Model $row) {
                $row->updateOrderFieldOnRestore();
            });
        }
    }
protected static function bootOrderableModel()
    {
        static::creating(function (Model $row) {
            $row->updateOrderFieldOnCreate();
        });

        static::deleted(function (Model $row) {
            $row->updateOrderFieldOnDelete();
        });

        if (in_array("Illuminate\Database\Eloquent\SoftDeletes", trait_uses_recursive(new static()))) {
            static::restoring(function (Model $row) {
                $row->updateOrderFieldOnRestore();
            });
        }
    }
protected static function bootOrderableModel ( ) { static :: creating ( function ( Model $ row ) { $ row -> updateOrderFieldOnCreate ( ) ; } ) ; static :: deleted ( function ( Model $ row ) { $ row -> updateOrderFieldOnDelete ( ) ; } ) ; if ( in_array ( "Illuminate\Database\Eloquent\SoftDeletes" , trait_uses_recursive ( new static ( ) ) ) ) { static :: restoring ( function ( Model $ row ) { $ row -> updateOrderFieldOnRestore ( ) ; } ) ; } }
Boot trait.
Boot trait .