public function applyOffset($query, \Illuminate\Http\Request $request)
    {
        $offset = $request->input('start', 0);
        $limit = $request->input('length', 10);

        if ($limit == -1) {
            return;
        }

        $query->offset((int) $offset)->limit((int) $limit);
    }
public function applyOffset($query, \Illuminate\Http\Request $request)
    {
        $offset = $request->input('start', 0);
        $limit = $request->input('length', 10);

        if ($limit == -1) {
            return;
        }

        $query->offset((int) $offset)->limit((int) $limit);
    }
public function applyOffset ( $ query , \ Illuminate \ Http \ Request $ request ) { $ offset = $ request -> input ( 'start' , 0 ) ; $ limit = $ request -> input ( 'length' , 10 ) ; if ( $ limit == - 1 ) { return ; } $ query -> offset ( ( int ) $ offset ) -> limit ( ( int ) $ limit ) ; }
Apply offset and limit to the query.

@param $query
@param \Illuminate\Http\Request $request
Apply offset and limit to the query .