How to get the contents of selected html table row

Please help I have table html like this


i need to get contents of row when i click in radio button ,Any solutions

 <table style="background: white;" class="table mb-0 thead-border-top-0">
                                                                <thead>
                                                                <tr>
                                                                    <th></th>
                                                                    <th >Livraison Estimée</th>
                                                                    <th>Coût</th>
                                                                    <th >Type de livraison</th>
                                                                </tr>
                                                                </thead>
                                                                <tbody class="list" id="staff">

                                                                <tr class="">
                                                                    <td>
                                                                        <div class="custom-control custom-radio">
                                                                            <input type="radio" class="custom-control-input" id="defaultChecked" name="defaultExampleRadios" checked>
                                                                            <label class="custom-control-label" for="defaultChecked"></label>
                                                                        </div>

                                                                    </td>
                                                                    <td><span class="text-muted">1-2 jours</span></td>
                                                                    <td>100 DH</td>
                                                                    <td>livraison à domicile</td>
                                                                </tr>


                                                                <tr class="">
                                                                    <td>
                                                                        <div class="custom-control custom-radio">
                                                                            <input type="radio" class="custom-control-input" id="defaultUnchecked" name="defaultExampleRadios">
                                                                            <label class="custom-control-label" for="defaultUnchecked"></label>
                                                                        </div>
                                                                    </td>
                                                                    <td><span class="text-muted">1-2 jours</span></td>
                                                                    <td>50 DH</td>
                                                                    <td>Livraison par Amana</td>
                                                                </tr>
                                                                </tbody>
                                                            </table>

use

wire:model="yourvalue"

and in your controller user the value as a public property

public $yourvalue

I believe it’s
wire:model

yeah sorry for that, you are righ

1 Like