db-to-redis-events-laravel maintained by bazarov392
DB to Redis Events Laravel
- At the moment, it is only compatible with MySQL and Laravel because it uses models from Laravel.
Installion
Install package
composer require bazarov392/db-to-redis-events-laravel
Use
// app/Providers/AppServiceProvider.php
use Bazarov392\RedisEventsFromDB;
public function boot(): void
{
RedisEventsFromDB::init();
// ...
}
Docs
Format message
db_event.{tableName}.{typeEvent}.{idRow}
- tableName - Table name
- typeEvent - Type event ( created | updated | deleted )
- idRow - If the column has a primary key, it will be listed here. If not, it will not be specified, but the JSON of the model will be in the body of the event.