コード例 #1
0
ファイル: AjaxController.php プロジェクト: saj696/pipe
 public function getEmployeeList(Request $request)
 {
     $workspace_id = Auth::user()->workspace_id;
     $inputs = $request->input();
     $salaries = Salary::where(['workspace_id' => $workspace_id, 'month' => $inputs['month'], 'employee_type' => Config::get('common.employee_type.Regular')])->get(['employee_id']);
     $employees = Employee::whereNotIn('id', $salaries)->where(['workspace_id' => $workspace_id, 'status' => 1, 'employee_type' => Config::get('common.employee_type.Regular')])->with('designation')->get();
     $list = view('ajaxView.employeeGenerateSalaryList')->with('employees', $employees)->render();
     return response()->json($list);
 }