Reputation: 544
How can I update a value to a view in laravel, whenever there is a change in mysql database. The update in the database can be from eloquent, external apps using api, or directly from phpmyadmin.
I don't want to use firebase.
Upvotes: 1
Views: 3793
Reputation: 16364
You need to use websockets in order to do so.
Let's make a quick reminder of how a simple web app work:
When you use websockets, here is what is happening:
Laravel provides a wrapper to use websockets, Laravel Echo.
If you want to know more, I strongly encourage you to read the documentation about it: https://laravel.com/docs/5.4/broadcasting#installing-laravel-echo
Here is a video from Laracasts introducing Laravel Echo also, if you don't like to read documentation: https://laracasts.com/lessons/introducing-laravel-echo
Upvotes: 5