'Where like' clause using the concatenated value of 2 columns with eloquent
问题 I have a query that searches for a term in several columns and one of them has to be a full name. I have separated the full name in name and lastname, so I have to concat these 2 values when searching. I have this right now only searching for name. How I would add the concat to lastname? I was investigating over mutators but I don't know if it is the way to way. public function search($searchQuery) { $search = "%{$searchQuery}%"; return Order::with('customer') ->orWhereHas('customer',