You're using sweet alert, but also some laravel wrapper package for it. You'd have to check the docs for both, for the versions you are using of each. Sweet alert has made many changes over the years, so it depends on what version you are using.
I'm not talking about laravel. I'm talking about whatever PHP package you are using in laravel to use sweet alert. Sweet alert is a javascript package. You are using something else on top of that to use sweet alert in php.
alert()->warning("You must register now.<br>", 'OK')->html()
That's php, not the sweet alert javascript package (or you would be using pure javascript and NO php for sweet alert). You'll need to find out from whatever package that is...and read their docs.
You're using
laravel 5.8
some version of the javascript sweet alert library
some version of a php wrapper library for that sweet alert javascript library
Yep, that's pretty clear. What's not clear is what packages and versions of those packages you are using. Not sure how anyone can really help you without knowing that.
What package are you using to be able to use this in your php controller:
alert()->warning("You must register now.<br>", 'OK')->html()
Because that is not the regular Sweet Alert Javascript Library. I don't know what that is, and you did not say. How did you install that? Through composer, or through npm? What package is it? Do you have a link to the library?