public function update(PortfolioRequest $request, Portfolio $portfolio)
    {
        try {
            $attributes = $request->all();

            $portfolio->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('portfolio::portfolio.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('portfolio/portfolio/' . $portfolio->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('portfolio/portfolio/' . $portfolio->getRouteKey()))
                ->redirect();
        }

    }
public function update(PortfolioRequest $request, Portfolio $portfolio)
    {
        try {
            $attributes = $request->all();

            $portfolio->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('portfolio::portfolio.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('portfolio/portfolio/' . $portfolio->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('portfolio/portfolio/' . $portfolio->getRouteKey()))
                ->redirect();
        }

    }
public function update ( PortfolioRequest $ request , Portfolio $ portfolio ) { try { $ attributes = $ request -> all ( ) ; $ portfolio -> update ( $ attributes ) ; return $ this -> response -> message ( trans ( 'messages.success.updated' , [ 'Module' => trans ( 'portfolio::portfolio.name' ) ] ) ) -> code ( 204 ) -> status ( 'success' ) -> url ( guard_url ( 'portfolio/portfolio/' . $ portfolio -> getRouteKey ( ) ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'portfolio/portfolio/' . $ portfolio -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Update the portfolio.

@param Request $request
@param Model   $portfolio

@return Response
Update the portfolio .