execute notification javascript with session

how can execute the notification with session?, so i don't use onclick

  @if (session('success'))
<script>
$('.snackbar-bg-primary').click(function() {
    Snackbar.show({
text: 'Primary',
actionTextColor: '#fff',
backgroundColor: '#1b55e2'
});
});
</script>
@endif

I pass the session with:

 return redirect('solicitudes')->with('success', 'Solicitud Envíada exitosamente!');

how can I execute the notification without using the click?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3yZRSVd
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

5 Free Black and White Social Media Icons Sets with CSS and HTML

How to Create Treeview with Bootstrap and jQuery

How to Change Apache and MySQL Port Number in XAMPP Localhost