Please try:
$finder = Auth::user()->client()->where(function($innerQuery) { $innerQuery->where('business_name', 'LIKE', '%' . $query . '%') ->orWhere('vat_number', 'LIKE', '%' . $query . '%') ->orWhere('fiscal_code', 'LIKE', '%' . $query . '%'); });
It will look for your relation AND (1 of your other fields).
Hopefully that will solve your case.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community