I want to create a notification after insertion on some tables. For example whenever a user inserts a comment I create a notification for the administrators that this user has created a comment.
I used to do it manually in the PHP, It wasn't as that bad, It was something like that:
// after the comment is created
Notification::create(....);
Not bad, but sometimes I give the user the ability to add images, posts, ..etc. So I have to remember every time to insert a notification.
So I am thinking of using a mysql trigger instead. But I am worry how that will affect the performance?
One last thing, Is it possible to create a trigger after insert on multiple tables?
Thanks,