public function index(TaskRequest $request)
    {

        if ($this->response->typeIs('json')) {
            $pageLimit = $request->input('pageLimit');
            $data      = $this->repository
                ->setPresenter(\Litepie\Task\Repositories\Presenter\TaskListPresenter::class)
                ->getDataTable($pageLimit);
            return $this->response
                ->data($data)
                ->output();
        }

        $tasks = $this->repository->paginate();

        return $this->response->title(trans('task::task.names'))
            ->view('task::task.index', true)
            ->data(compact('tasks'))
            ->output();
    }