mardi 12 janvier 2021

How do i sent dynamic values from form (post method) back to controller

I am quite new to laravel,

Basically, I have this Form where I am showing values Dynamically, and those values i need to pass into controller again for Delete, but not understanding how to do it.

my blade is as bellow

    <div class="col-md-12">
        @if(isset($rtn_user_id))

                @csrf
            <table>

            <tr>


            <td>Customer Name</td> <td>Vechile Name</td>  <td>Imei</td><td>Actions</td>
            </tr>

                <tr>

                    <td> </td> <td></td> <td> </td>  <td></td> <td><button type="button">Delete</button></td>
                </tr>

            </table>

        @endif
    </div>
    </form>

my operation.delete_imei is like this

so I want to pass the values of $rtn_imei to the controller

public function delete_imei(Request $request) {

    $post_imei = $request->imei;
    dd($pos_imei)
 

}

web.php

 Route::post('deleteimei', 'Operation@delete_imei')->name('operation.delete_imei');

Can you please help me with this



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire