0
Hello I am currently working with an access verification project. I need that when the person has access granted by the system triggers a sound "successfully authorized passage", my question is I can do this with Events of the Laravel?
0
Hello I am currently working with an access verification project. I need that when the person has access granted by the system triggers a sound "successfully authorized passage", my question is I can do this with Events of the Laravel?
1
He can, but he also has other ways of doing it. You can record Flash Data, which gives you a 1 cycle life only (once updated the page it ceases to exist) and you execute a scritp when the flash exists, ie when log in for the first time you define the flash, check if it exists, run javascript (audio) and when the user changes pages there will no longer be that flash and also the audio will only play again.
Controller :
Session::flash('message', 'This is a message!');
View
@if(Session::has('message'))
<script ......> </script>
endif
Browser other questions tagged laravel
You are not signed in. Login or sign up in order to post.
It doesn’t. Laravel’s events are for dealing with backend and treat them asynchronously through the execution queues. Emitting a sound seems to be the responsibility of the frontend and probably thing to be done with Javascript.
– Woss
Thanks for the answer! You would indicate me a way to do via JS?
– Beatriz Carlos