I'm building a microservice over an old system that has its notification system. I'm using Laravel for this microservice and want to leverage its notification system after tailoring it to the old notification. the old system has these table fields:
[ 'id', 'organization_id', 'user_id', 'time', 'module', 'title', 'description', 'text', 'status', 'payload' ]; How to make the database channel using this old table?
you need to add some custom columns to the laravel notifications default migration files
firstly you need to run this command to generate the notification migration files
php artisan notifications:table
then edit the migration file to add your custom columns, and create a Notification model for it. Don't forget to override the user notifications to use the new model
after that, you need need to override the database channel to automatically save you the data
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community