Searchable Has Many Issue
Greetings,
I was wondering how can i make column searchable by InventoryLocation name and also UserLocations.name but latest only.
I have tried whereHas with subQuery but it does not work..
Any idea how to make it work?
3 Replies
Check the
->latestOfMany()
relationship of Laravel. I think that would helpLaravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Thanks Dennis, will do try it out.