public function index(MessageRequest $request)
    {

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

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

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

    }