mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
added team name into search results
This commit is contained in:
1 parent
66e6b84bd9
commit
ba5a6a2bd8
1 file changed
+1
-2
+1
-2
@@ -111,10 +111,9 @@ Route::middleware(['auth:sanctum', 'abilities:full-access'])->group(function ()
|
||||
|
||||
$userIDs = User::where('firstname', 'like', '%' . $search . '%')->orWhere('lastname', 'like', '%' . $search . '%')->get()->pluck('id');
|
||||
|
||||
|
||||
$teams = Team::whereHas('users', function($q) use($userIDs) {
|
||||
$q->whereIn('user_id', $userIDs);
|
||||
})->get();
|
||||
})->orWhere('name', 'like', '%' . $search . '%' )->get();
|
||||
|
||||
$mastertasks = MasterTask::with('subtasks')->where('title', 'like', '%' . $search . '%')->orWhereIn('project_id', $projectIDs)->orWhereIn('team_id', $teams->pluck('id'))->get();
|
||||
|
||||
|
||||
Reference in new issue
Block a user