Merge pull request #11651 from inietov/fixes/activity_report_search
Fixed Search in activity report for full name in relation
This commit is contained in:
commit
3ac84eab58
1 changed files with 4 additions and 0 deletions
|
@ -162,6 +162,10 @@ trait Searchable
|
||||||
$query->orWhere($table.'.'.$column, 'LIKE', '%'.$term.'%');
|
$query->orWhere($table.'.'.$column, 'LIKE', '%'.$term.'%');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// I put this here because I only want to add the concat one time in the end of the user relation search
|
||||||
|
if($relation == 'user') {
|
||||||
|
$query->orWhereRaw('CONCAT (users.first_name, " ", users.last_name) LIKE ?', ["%$term%"]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue