Jaime_Celes's avatar

Bootstrap Modal Not showing

I'm trying to use bootstrap modal for editing/updating data, the first modal I created worked, but the second one that I had created to different folder/blade doesn't. I'm not sure what's the problem.

This is my admin.adminmodal

			<!-- Modal -->                   
		<div class="modal fade" id="updateModal{{$data->id}}" tabindex="-1" role="dialog" aria-labelledby="updateModal{{$data->id}}" aria-hidden="true">
		 <div class="modal-dialog" role="document">
		<div class="modal-content">
  			<div class="modal-header">
       		 <img src="assets/images/rice.png">
   		 <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="col-lg-12">
    <div class="contact-form">

			</div>
		 </div>

  			</div>
		 </div>
		</div>
		</div>
			<!-- End Modal -->

My button in my blade file

			<td><a class="btn btn-primary" data-toggle="modal" data-target="#updateModal{{$data->id}}">UPDATE</a></td>
				@include('admin.adminmodal')
0 likes
1 reply
Lara_Love's avatar

Hello . Your question is not clear, can't it be edited with Bootstrap?

https://getbootstrap.com

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap demo</title>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
  </head>
  <body>
  


<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">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>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
  </body>
</html>

Please or to participate in this conversation.