mardi 24 avril 2018

Laravel Drop down

I have 3 tables.

departments -id -name

designations -id -designation

teachers -id -name -depertment_id -designation_id

Now how can i select teachers name with changing depertment and designation

In View:

                 <div class="form-group">
                        <label for="">Department</label>
                        <select name="depertment" id="depertment" class="form-control input-sm depertment">
                              <option value="" id="dept_slect">Select Depertment</option>
                             @foreach($depertments as $depertment)
                              <option value=""></option>
                             @endforeach                 
                        </select>
                    </div>

                    <div class="form-group">
                        <label for="">Designation</label>
                        <select name="des" id="des" class="form-control input-sm des">
                            <option value="#designation">Select Designation</option>
                             @foreach($designations as $designation)
                              <option value=""></option>
                             @endforeach 
                        </select>
                    </div>


                    <div class="form-group">
                        <label for="">Teacher</label>
                        <select name="teacher" id="teacher" class="form-control input-sm teacher">
                            <option value="#dept_slect">Select Teacher's name</option>
                        </select>
                    </div>                        



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire