mercredi 14 octobre 2020

How to get dynamic data in bootstrap modal for each id by using laravel?

I am developing an app which requires to show the data at every click on my different list of icon. The problem is how to display data in to bootstrap modal according to id. Thanks in advance. index.blade.php .

<div class="col-md-3">
     <button  type="button" class="btn btn-success " data-toggle="modal" data-target="#myModal" data-id="">Ajouter
  </button>
 </div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="modelTitleId"
  aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
            <div class="modal-content" >
                <div class="modal-header">
                    <h5 class="modal-title">Modal title</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body" >
                    <div class="container-fluid">
                          <div class="row">
                              <div class="col-md-12 ">
                                 <div class="panel panel-default">
                                    <div class="panel-heading text-center">Nouvelle annonce</div>
                                         <div class=" form-group col-sm-6">
                                            <img class="cart-img img-responsive" src="images/cover_image/" alt="IMG-PRODUCT">
                                         </div>
                                        <div class=" form-group col-sm-3">
                                             <span id="layer_cart_product_title" class="product-name layer_cart_product_title"><h2> </h2> </span>
                                                <hr>
                                            <span id="layer_cart_product_ti" class="product-name"><h4> &nbsp;</h4> </span>
                                            <span id="layer_cart_product_ti" class="product-name"><h4> &nbsp;</h4> </span>
                                                    <hr>
                                             <span id="layer_cart_product_ti" class="product-name"><h4> &nbsp;</h4> </span>
                                            </div>
                                            


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire