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());
    }
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());
    }
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 ( ) ) ; }
Update the specified Pages in storage.

@param int          $id
@param PagesRequest $request

@return Response
Update the specified Pages in storage .