protected function updateModel($model, array $attributes, $authorize = [])
    {
        if (is_null($model) || !$model->exists) {
            return $this->notFoundResponse();
        }

        $this->parseAuthorization($model, $authorize);

        $model->update($attributes);

        return $this->response($model, $this->trans('updated'));
    }
protected function updateModel($model, array $attributes, $authorize = [])
    {
        if (is_null($model) || !$model->exists) {
            return $this->notFoundResponse();
        }

        $this->parseAuthorization($model, $authorize);

        $model->update($attributes);

        return $this->response($model, $this->trans('updated'));
    }
protected function updateModel ( $ model , array $ attributes , $ authorize = [ ] ) { if ( is_null ( $ model ) || ! $ model -> exists ) { return $ this -> notFoundResponse ( ) ; } $ this -> parseAuthorization ( $ model , $ authorize ) ; $ model -> update ( $ attributes ) ; return $ this -> response ( $ model , $ this -> trans ( 'updated' ) ) ; }
Update a given model's attributes.

@param  Model  $model
@param  array  $attributes
@param  array|string  $authorize
@return JsonResponse|Response
Update a given model s attributes .