jeudi 15 juillet 2021

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?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire