Replies: 1 comment 1 reply
-
Checked out the code a bit. It's possibly to make this work like this: Lazy::create(fn() => ...)->condition(fn () => ...); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everybody,
I'd like to prevent exceeding max call stack on two
Data
that have relations to each other.Currently I am doing this with
Lazy::create
- which works fine:User
has aCar
Car
belongs to anUser
Now I'd also like to add some conditions: A user should only be able to see his
Car
, if he's authenticated.Now
Lazy::when
is always being added, if the condition resolves totrue
. In my case it would be most useful, to add these "relations" only, if specifically called withinclude(...)
and if the condition returnstrue
.Beta Was this translation helpful? Give feedback.
All reactions