Support the ongoing development of Laravel.io →
Eloquent
Last updated 2 years ago.
0
$clients = Client::leftJoin('contacts', function($join) {
		$join->on('client.id', '=', 'contacts.client_id');
	})
	->where('contacts.type','=','main')
	->get();

maybe something like this?

Last updated 9 years ago.
0

Perfectly, thanks for your help!!! Now I understand the concept. Sorry my bad english :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.