public function update($id, PagesRequest $request)
    {
        $pages = $this->repository->find($id);

        if (empty($pages)) {
            Cms::notification('Page not found', 'warning');

            return redirect(route($this->routeBase.'.pages.index'));
        }

        $pages = $this->repository->update($pages, $request->all());
        Cms::notification('Page updated successfully.', 'success');

        if (!$pages) {
            Cms::notification('Page could not be saved.', 'warning');
        }

        return redirect(url()->previous());
    }