Level 75
Change it to this and it should work
@if (session()->has('success'))
<script>
Swal.fire({
icon: 'success',
title: 'Success',
text: 'Updated successfully!',
})
</script>
@endif
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
here is my script
<script>
@if(session()->has('success'))
Swal.fire({
icon: 'success',
title: 'Success',
text: 'Updated successfully!',
})
@endif
</script>
but this is not working.
Change it to this and it should work
@if (session()->has('success'))
<script>
Swal.fire({
icon: 'success',
title: 'Success',
text: 'Updated successfully!',
})
</script>
@endif
Please or to participate in this conversation.