diff --git a/src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiTrait.php b/src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiTrait.php index 55bee83..7bfc8b5 100644 --- a/src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiTrait.php +++ b/src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiTrait.php @@ -128,7 +128,7 @@ protected function createResourceCallable() } if (!empty($data['id'])) { - $model->setAttribute($model->getKeyName(), $values['id']); + $model->setAttribute($model->getKeyName(), $data['id']); } try {