How to use input data with the livewire?
I want to use input data to compare it with other data. Before the Livewire I used two steps form to save the data in the database. In the first step, I saved the data in the session, and in the second step compared the session data with the data in the database to receive the results that I need. Since I do everything in one form now I have to do some changes. So in conclusion, I want time slots id input to be different depending on what date input is. And to do that I have to compare the database data date with the input date. Here's how I did it in the two steps form without the livewire:
$appointment = $request->session()->get('appointment');
$appointment_time_ids = Appointment::orderBy('date')->get()->filter(function($value) use($appointment){
return $value->date->format('Y-m-d') == $appointment->date->format('Y-m-d');
})->pluck('time_slot_id');
Please or to participate in this conversation.