Skip to content

Can someone explain this odd php exception that happens on toArray and not on eager loading or filters? #53783

Discussion options

You must be logged in to vote

It seems that changing the static::$constraints to false and then to true again, (so the value matches the parent default value), generates the php error.

Update
local.DEBUG: BEFORE ERROR RelationCleverTrait::$constraints:true
local.DEBUG: BEFORE ERROR Relation::$constraints:false

Solution is to not use a trait but duplicate code.

macropay-solutions/laravel-crud-wizard-free@670949a

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by macropay-solutions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant