Yep, that's right about conditional rendering - there's a note on this in the Extenders doc. The way you've done it works well, or an alternative would be to replace the search component with a closur...
Ahhh, I see, the alternative you've provided with the closure looks cleaner , thanks! I shouldn't have missed that in the docs .
Okay, that makes sense, I'll use the resolveRelationUsing method for adding relationships. Is there any way we can add traits to the Waterhole\Models\User class in a similar way as adding relationships via the resolveRelationUsing method? I wanted to use this Laravel package, Overtrue\LaravelFavorite, but it requires the use of traits on the User model. I want to use this package to allow users to favourite my own models.
You don't have permission to do this.
You're going a bit too fast! Take a break and try again in a moment.
Something went wrong! Please reload the page and try again.
Ahhh, I see, the alternative you've provided with the closure looks cleaner , thanks! I shouldn't have missed that in the docs .
Okay, that makes sense, I'll use the
resolveRelationUsing
method for adding relationships. Is there any way we can addtraits
to theWaterhole\Models\User
class in a similar way as adding relationships via theresolveRelationUsing
method? I wanted to use this Laravel package, Overtrue\LaravelFavorite, but it requires the use oftraits
on the User model. I want to use this package to allow users to favourite my own models.