protected function getQuery($applyGlobalGroupScope = true)
    {
        $query      = $this->query();
        $this->addFilters();
        $finalQuery = $this->applyScopes($query);
        if ($applyGlobalGroupScope) {
            $this->applyGlobalGroupScope($finalQuery);
        }
        $request = app('request');
        if ($finalQuery instanceof Collection) {
            return $finalQuery;
        }
        $perPage = $this->getPerPage();
        if (!$request->ajax()) {
            return $finalQuery->skip($request['start'])->take($perPage);
        }

        return $finalQuery;
    }