Closed kriiv closed 4 years ago
It's just a warning, you can safetly ignore it.
It's a warning but I am doing something like Alert::success(etc etc);
and no icon 'tick' is showing because of it.
Sorry seem that you are right, I just come today to this package, and I didn't test it enough.
The problem can be solved quickly, by changing here:
https://github.com/uxweb/sweet-alert/blob/master/src/SweetAlert/SweetAlertNotifier.php#L82
to:
$this->config['icon'] = $icon;
Without changing package code, if you publish the view and use your custom, this can be a workaround:
@if (Session::has('sweet_alert.alert'))
<script>
@if (Session::has('sweet_alert.content'))
var config = {!! Session::pull('sweet_alert.alert') !!}
config.icon = config.type;
delete config.type;
var content = document.createElement('div');
content.insertAdjacentHTML('afterbegin', config.content);
config.content = content;
swal(config);
@else
var config = {!! Session::pull('sweet_alert.alert') !!}
config.icon = config.type;
delete config.type;
swal(config);
@endif
</script>
@endif
You are AWESOME.
I published the view and made the changes you suggested. Works perfectly.
Sweet. Thanks @thewebartisan7 !
Getting this error. On
dev-master
Laravel 6. Pulling sweetalert.js (2.1.2) from Cloudflare.SweetAlert warning: "type" option has been deprecated. Please use "icon" instead.