Skip to content

[9.x] Improves Pivot tests #44626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 20, 2022

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Oct 18, 2022

Signed-off-by: Mior Muhammad Zaki [email protected]

…rror on "strict mode" when pivot doesn't have an ID.

```
The attribute [id] either does not exist or was not retrieved for model [Illuminate\Database\Eloquent\Relations\Pivot]. {"userId":4,"exception":"[object] (Illuminate\\Database\\Eloquent\\MissingAttributeException(code: 0): The attribute [id] either does not exist or was not retrieved for model [Illuminate\\Database\\Eloquent\\Relations\\Pivot]. at /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:470)
````

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
@crynobone crynobone changed the title [9.x] Improves accessing $model->pivot->getKey() doesn't throw an error on "strict mode" when pivot doesn't have an ID [9.x] Improves Pivot tests Oct 20, 2022
@taylorotwell taylorotwell merged commit f88ffd1 into laravel:9.x Oct 20, 2022
@crynobone crynobone deleted the patch-pivot-id-on-strict-mode branch November 3, 2022 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants