How to show the icon of success message with Sweetalertjs in the Controller

I’m using Laravel and Sweetalertjs v2 and I wanted to show a success message at the Controller method:

alert(“Submitted successfully”,”submitted”);

And the alert successfully comes up, but the problem is the success icon does not appear.

And in the docs, there is no code for writing an alert and showing and icon type.

It just written this code which is Javascript based and cannot be used in the Controller:

Swal.fire({
  icon: 'error',
  title: 'Oops...',
  text: 'Something went wrong!',
  footer: '<a href="">Why do I have this issue?</a>'
})

So how can I show the icon of alert (success, error, warning, info) at the top of the alert box when using the sweetalert in the Controller method of Laravel?