$clients = Client::leftJoin('contacts', function($join) {
$join->on('client.id', '=', 'contacts.client_id');
})
->where('contacts.type','=','main')
->get();
maybe something like this?
Perfectly, thanks for your help!!! Now I understand the concept. Sorry my bad english :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community