skip to Main Content

Laravel. how to get the removedEmployees from mergedEmployees?

this code is not working: $removedEmployees = $mergedEmployees->diff($uniqueEmployees); here is my code. $employees1 = Employee::where('employment_status', '<>', 'SEPARATED') ->where('client_code_1', $client->client_code) ->where('position', $grouping->position) ->where('billable_rate', $grouping->billable_rate) ->get(); $employees2 = Employee::where('employment_status', '<>', 'SEPARATED') ->where('client_code_2', $client->client_code) ->where('position', $grouping->position) ->where('billable_rate', $grouping->billable_rate) ->get(); $mergedEmployees = $employees1->merge($employees2); $uniqueEmployees…

VIEW QUESTION
Back To Top
Search