简体   繁体   English

Laravel 7 Sweet alert Uncaught ReferenceError: Swal is not defined

[英]Laravel 7 Sweet alert Uncaught ReferenceError: Swal is not defined

Controller: controller Controller: controller

Master Layout: MasterLayout主布局: MasterLayout

Alert blade: vendor-alert-blade警报刀片:供应商警报刀片

My question is how to fix this error.我的问题是如何解决这个错误。 console log error The method in my controller is also working the alert is working but the problem is the Swal.控制台日志错误我的 controller 中的方法也有效,警报有效,但问题是 Swal。 help me to fix this.帮我解决这个问题。 I will provide all code examples if needed.如果需要,我将提供所有代码示例。 thank you!谢谢你!

Please add the below sweet alert js and css请添加以下甜蜜警报js和css

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.6/dist/sweetalert2.all.min.js"></script>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/sweetalert2@10.10.1/dist/sweetalert2.min.css'>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM