Skip to content
Discussion options

You must be logged in to vote

Do you soft delete the records in your pivot table (building_owners)? If so, as far as I know soft deletes doesn't work in pivot tables. You will have to update your relationship and explicitly exclude entries with a value in the deleted_at column (->wherePivotNull('deleted_at'))

https://laravel.com/docs/8.x/eloquent-relationships#filtering-queries-via-intermediate-table-columns

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ginuwine72
Comment options

Answer selected by ginuwine72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants