'Laravel open modal when clicking a button

I am using the Laravel framework, and I have a button that submit a form. I would like a popup (modal) to open when the button is clicked to confirm or not the submission. Can anyone help me out here?

Example



Solution 1:[1]

If you are using bootstrap and ajax. You can do something like on submit or click

$.ajax({
method: "POST",
url: "Your-url",
data: data,
success: function(res){
$("#modelID").show();
}
});

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 M Umer Yasin