skip to Main Content

Laravel 10 relation dynamic variable in subquery

How can I call a dynamic variable in a subquery? I have some relations and call them like: $locations = Location::query() ->with('brands', function ($query) { $query->with('employees')->where('location_id', {dynamic ID of brand location}); }) ->get(); The relation in the Location.php Class: public…

VIEW QUESTION

Issues with Laravel groupBy

I am using Laravel 10. This is crm_details table: I need to count each status,. Also I need to consider parent_token with the same value as a single row. That means 2 rows have same `parent_token' then It will consider…

VIEW QUESTION
Back To Top
Search