public function update(PriceListRequest $request, PriceList $price_list)
    {
        try {
            $attributes = $request->all();

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

    }
public function update(PriceListRequest $request, PriceList $price_list)
    {
        try {
            $attributes = $request->all();

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

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

@param Request $request
@param Model   $price_list

@return Response
Update the price_list .