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

تعليقات

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

How to Create Treeview with Bootstrap and jQuery

Api routes not found when hosted laravel application on server

How to Add Images to Dropdown List using jQuery