I'm facing an issue with my code. I have implemented a feature where a modal should be triggered after a user successfully adds a new user. However, I am using Materialize and the modal is not being triggered. Below is a snippet of my code:
<div id="thisismymodal" class="modal">
<div class="modal-content">
<h4>Modal Header</h4>
<p>A bunch of text</p>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
</div>
</div>
@if( Session::has('uadded') )
{{ Session::forget('uadded') }}
<script>
alert("well hello there!");
$(document).ready(function()
{
$('#thisismymodal').leanModal();
$('#thisismymodal').openModal();
});
</script>
@endif
Currently, only the alert is getting triggered and not the modal. Can someone help me identify the issue in my code?