i want to insert data into database directly from a table (view) but when i click add btn only the first or the last row get insterted – Jquery ajax
here in this code i have passed the hardcoded value of month if i remove january it accepts december i.e last row how to solve this issue controller public function storeLeave(Request $request){ $admin= new Admin(); $admin->employee_name=$request->input('employee_name'); $admin->month=$request->input('month_JANUARY'); $admin->earned_leave=$request->input('earned_leave_JANUARY'); $admin->casual_leave=$request->input('casual_leave_JANUARY'); $admin->sick_leave=$request->input('sick_leave_JANUARY');…