mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 02:41:36 +00:00
15 lines
472 B
PHP
15 lines
472 B
PHP
<div>
|
|
<script>
|
|
window.addEventListener('toast', (e) => {
|
|
window.toastr[e.detail.type](e.detail.message)
|
|
});
|
|
</script>
|
|
@if(session()->has('toast.type') && session()->has('toast.message'))
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
window.toastr['{{ session()->get('toast.type') }}']('{{ session()->get('toast.message') }}');
|
|
});
|
|
</script>
|
|
@endif
|
|
</div>
|