Dec 11, 2022
5
Level 1
How can I count from two tables in my eloquent query?
I have two table named 'customers' & 'linkeds', now I want to get the count of 'customer_name'.
Below is my query.
$this->linked = $this->linked->join('customers', 'linkeds.customer_id', '=', 'customers.id')-
>where('customer_name', $customer_name)->get();
Please or to participate in this conversation.