public function get(DataTable $datatable)
    {
        if (php_sapi_name() === 'cli') {
            return 10;
        }

        if (!$this->request->hasSession()) {
            return;
        }
        $key     = $this->getSessionKey(get_class($datatable));
        $perPage = $this->getFromSession($key, (int) request('length', $datatable->perPage));
        return is_null($perPage) ? 10 : $perPage;
    }