public function edit($id) { $wage = Wage::where('id', '=', $id)->with('employee')->first(); return view('payrolls.dailyWagePayment.edit')->with(compact('wage')); }
public function getDailyWorkerList(Request $request) { $current_date = strtotime($request->payment_date); $payments = Wage::where('employee_type', '=', Config::get('common.employee_type.Daily Worker'))->where('payment_date', '=', $current_date)->get(['employee_id'])->toArray(); $emp = array_values(array_column($payments, 'employee_id')); $employees = Employee::where('employee_type', '=', Config::get('common.employee_type.Daily Worker'))->whereNotIn('id', $emp)->with('designation')->get(); $ajaxView = view('payrolls.dailyWagePayment.ajaxView')->with(compact('employees'))->render(); return response()->json($ajaxView); }