Answer the question
In order to leave comments, you need to log in
How to find out about a new entry in the database?
Such a question, for example, now 10 products are stored in the database, but one of the users added 1 product, when entering the admin panel, how to notify the admin that a product has been added? What is the logic of this function, are there examples of implementation in the internet?
Answer the question
In order to leave comments, you need to log in
I did something like this (only, instead of goods there were messages):
1) the -status- field, where 1 is a new message, 0 is viewed by the admin;
2) to display new ones - there is a request + where status = 1;
3) when viewed by the admin in the admin panel, you need to update the status: Update....
status = 0 where id =...
Make a notification system. When adding a new product in the afterSave method in the model, write information to the table with notifications.
And when you log in as an administrator, show all unread notifications. Well, a separate form for displaying all notifications.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question