How To Add Bootstrap Modal In Laravel
Today I will show you how to add bootstrap modal in Laravel. Modals are built with HTML, CSS, and JavaScript. many times we need to set confirmation on alert box using java script but now bootstrap provide us facilities like bootstrap modal, it is very simple to use.
For bootstrap modal in just you need to add latest javascript CDN and bootstrap CDN, some other JS. So, Add below code in your PHP or Laravel blade file and get output.
Bootstrap Modal Methods
Activates your content as a modal.
$('#demoModal').modal({
keyboard: false
})
Manually toggles a modal. using this method you can toggle modal manually like below code.
$('#demoModal').modal('toggle')
Manually opens a modal. using hide/show method you can manually show modal like below code.
$('#demoModal').modal('show')
$('#demoModal').modal('hide')
you will get output like below screen shot.
Thank you for reading.