public function update($id, MenuRequest $request)
    {
        try {
            $menu = $this->repository->find($id);

            if (empty($menu)) {
                Cms::notification('Menu not found', 'warning');

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

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

            if (!$menu) {
                Cms::notification('Menu could not be updated.', 'danger');
            }
        } catch (Exception $e) {
            Cms::notification($e->getMessage() ?: 'Menu could not be updated.', 'danger');
        }

        return redirect(route($this->routeBase.'.menus.edit', [$id]));
    }
public function update($id, MenuRequest $request)
    {
        try {
            $menu = $this->repository->find($id);

            if (empty($menu)) {
                Cms::notification('Menu not found', 'warning');

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

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

            if (!$menu) {
                Cms::notification('Menu could not be updated.', 'danger');
            }
        } catch (Exception $e) {
            Cms::notification($e->getMessage() ?: 'Menu could not be updated.', 'danger');
        }

        return redirect(route($this->routeBase.'.menus.edit', [$id]));
    }
public function update ( $ id , MenuRequest $ request ) { try { $ menu = $ this -> repository -> find ( $ id ) ; if ( empty ( $ menu ) ) { Cms :: notification ( 'Menu not found' , 'warning' ) ; return redirect ( route ( $ this -> routeBase . '.menus.index' ) ) ; } $ menu = $ this -> repository -> update ( $ menu , $ request -> all ( ) ) ; Cms :: notification ( 'Menu updated successfully.' , 'success' ) ; if ( ! $ menu ) { Cms :: notification ( 'Menu could not be updated.' , 'danger' ) ; } } catch ( Exception $ e ) { Cms :: notification ( $ e -> getMessage ( ) ? : 'Menu could not be updated.' , 'danger' ) ; } return redirect ( route ( $ this -> routeBase . '.menus.edit' , [ $ id ] ) ) ; }
Update the specified Menu in storage.

@param int         $id
@param MenuRequest $request

@return Response
Update the specified Menu in storage .