Level 44
In bootstrap.js:
window.swal = require('sweetalert2');
1 like
var swal = require('sweetalert');
I try to put it into bootstrap.js, but it's not working at all. Then I try to call it in my blade view.
<script>
swal({
text: "Hello world!",
});
</script>
I just get an error like this. swal is not defined
Please or to participate in this conversation.