public function sortable(
        array $orderColumns = [],
        string $orderByKey = 'order_by',
        string $directionKey = 'direction'
    ): void {
        $model = $this->resolveQueryBuilderFromModel($this->model);
        $request = $this->app->make('request');

        $orderByValue = $request->input($orderByKey);
        $directionValue = $request->input($directionKey);

        $this->set('filter.order_by', ['key' => $orderByKey, 'value' => $orderByValue]);
        $this->set('filter.direction', ['key' => $directionKey, 'value' => $directionValue]);
        $this->set('filter.columns', $orderColumns);

        $this->model = $this->setupBasicQueryFilter($model, [
            'order_by' => $orderByValue,
            'direction' => $directionValue,
            'columns' => $orderColumns,
        ]);
    }
public function sortable(
        array $orderColumns = [],
        string $orderByKey = 'order_by',
        string $directionKey = 'direction'
    ): void {
        $model = $this->resolveQueryBuilderFromModel($this->model);
        $request = $this->app->make('request');

        $orderByValue = $request->input($orderByKey);
        $directionValue = $request->input($directionKey);

        $this->set('filter.order_by', ['key' => $orderByKey, 'value' => $orderByValue]);
        $this->set('filter.direction', ['key' => $directionKey, 'value' => $directionValue]);
        $this->set('filter.columns', $orderColumns);

        $this->model = $this->setupBasicQueryFilter($model, [
            'order_by' => $orderByValue,
            'direction' => $directionValue,
            'columns' => $orderColumns,
        ]);
    }
public function sortable ( array $ orderColumns = [ ] , string $ orderByKey = 'order_by' , string $ directionKey = 'direction' ) : void { $ model = $ this -> resolveQueryBuilderFromModel ( $ this -> model ) ; $ request = $ this -> app -> make ( 'request' ) ; $ orderByValue = $ request -> input ( $ orderByKey ) ; $ directionValue = $ request -> input ( $ directionKey ) ; $ this -> set ( 'filter.order_by' , [ 'key' => $ orderByKey , 'value' => $ orderByValue ] ) ; $ this -> set ( 'filter.direction' , [ 'key' => $ directionKey , 'value' => $ directionValue ] ) ; $ this -> set ( 'filter.columns' , $ orderColumns ) ; $ this -> model = $ this -> setupBasicQueryFilter ( $ model , [ 'order_by' => $ orderByValue , 'direction' => $ directionValue , 'columns' => $ orderColumns , ] ) ; }
Execute sortable query filter on model instance.

@param  array   $orderColumns
@param  string  $orderByKey
@param  string  $directionKey

@return void
Execute sortable query filter on model instance .