mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
init
This commit is contained in:
14
resources/views/components/toast.blade.php
Normal file
14
resources/views/components/toast.blade.php
Normal file
@ -0,0 +1,14 @@
|
||||
<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>
|
Reference in New Issue
Block a user