i have a messaging system app and every message has some status in it with 3 types of done , in progress,not started so when i send a message to user B its not started for example so when user B receive the message he changes the status to in progress here i want to send a notification to the sender and the admin that the status has been changed how can i monitor database for changes and when it changes it generates some specific notification and send it . here is the migration of message table
public function up()
{
Schema::create('messages', function (Blueprint $table) {
$table->increments('id');
$table->string('title')->nullable();
$table->string('body');
$table->integer('status');
$table->integer('sender_id');
$table->integer('receiver_id');
$table->timestamps();
});
}