Looking to hire Laravel developers? Try LaraJobs

db-to-redis-events-laravel maintained by bazarov392

Description
Events about data changes from the database to Redis
Author
Last update
2023/06/06 15:19 (v1.0.x-dev)
License
Links
Downloads
8
Tags

Comments
comments powered by Disqus

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.