mardi 29 juin 2021

condition hide if it was used on the day

i need create a condition that hides a field if it was already used on the day. the fields to hide are hours i need to create the condition so that the time is not taken twice

enter image description here

that is, if the 10:00 shift has already been used, no one can use it again on the day of the date.

Blade.php:

                        <div class="col-md-6  col-sm-6 col-12">
                                <div class="form-group start-date">
                                    <label for="start-date" class="">Hora:</label>
                                    <div class="d-flex">
                                
                                    <select name="hora" class="form-control form-control-sm">
                                    @foreach($horarios as $dato)
    <option>

    </option>
    @endforeach

</select>
                                    </div>
                                </div>
                            </div>
                            
                        </div>

controller:

     public function index(){
       

          $datax = [
            'category_name' => 'apps',
            'page_name' => 'calendar',
            'has_scrollspy' => 0,
            'scrollspy_offset' => '',
    

        ];


       
       
  
         $month = date("Y-m");
         //
         $data = $this->calendar_month($month);
         $mes = $data['month'];
         // obtener mes en espanol
         $mespanish = $this->spanish_month($mes);
         $mes = $data['month'];
$registros = \App\Models\Horarios::All();
  
         return view("home",[
           'data' => $data,
           'mes' => $mes,
           'mespanish' => $mespanish,
           'horarios' => $registros
         ])->with($datax);
  
     }

help please



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3qxPMZw
via IFTTT

Aucun commentaire:

Enregistrer un commentaire