Skip to content

Using Lazy::whenLoaded with Larastan #279

Answered by Nir-An
benbjurstrom asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @benbjurstrom

I think you should use from as a function to create an object because it is a magical-creation and not fromModel

this way it should handle with null value.

fn() => UserData::from($bp->user)

Replies: 1 comment 1 reply

Comment options

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

Answer selected by benbjurstrom
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