Reputation: 109
I am beginner in laravel and working on a room booking system. I have added the toggle button in each room list for Availability and Booking. Now, i want to get the checkbox value and save them in database.
<td>
<label class="custom-toggle">
<input type="checkbox" name="availability" id="availability">
<span class="custom-toggle-slider rounded-circle"></span>
</label>
</td>
I have availability
column in rooms
table. I want to save the Available
and Booked
value in db using ajax or any best method.
Upvotes: 1
Views: 863
Reputation: 67
I can help you with that.
know used onclick="roomTest('{{$id}}')"
<input type="checkbox" name="availability" id="availability" onclick="roomTest('{{$id}}')">
Upvotes: 2