DEV Community

Techsolutionstuff
Techsolutionstuff

Posted on • Originally published at techsolutionstuff.com

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
})
Enter fullscreen mode Exit fullscreen mode

Manually toggles a modal. using this method you can toggle modal manually like below code.

$('#demoModal').modal('toggle')
Enter fullscreen mode Exit fullscreen mode

Manually opens a modal. using hide/show method you can manually show modal like below code.

$('#demoModal').modal('show')
$('#demoModal').modal('hide')
Enter fullscreen mode Exit fullscreen mode

Read More : How To Add Bootstrap Modal In Laravel


you will get output like below screen shot.

How To Add Bootstrap Modal In Laravel


You May Also Like To Read :

  1. Read More : How To Delete Multiple Records Using Checkbox In Laravel

  2. Read More : Laravel 6 CRUD Tutorial with Example

Thank you for reading.

Top comments (0)