Well mate, you said you do not know how to start, right? Well, this sometimes happens when the objective experience exceeds current knowledge. However, the community in general knows, all that programmer that this feeling is well known when you dedicate yourself to programming, since with the passage of time you want to create bigger things and you are learning more and more, and more and more complex everything. But calm, everything comes to control over time and practice. I will try to help you as I would since I have been able to imagine it in my head as for my own web project. How to implement it?
I would do it in the following way and is thinking about the "route" that the service would perform.
The first thing is to divide the complex objective into as many processes as you can and make it easy.
1st create a form in your administration panel
a) In this panel you create a section where there will be a form to create notifications. This implies a form with
Campo de texto para tu notificación "INPUT TEXT",
campo para referencia id cliente "INPUT NUMBER",
b) Fill the 2 data (the message and the customer ID)
c) Then send it to the logic that controls the data of the form.
2º Form data arrive to the controller (logic)
a) First of all we must create the table where we store the notification data, that is,
notificaciones_usuarios
In this table we will have:
id - (incremental unica) para evitar repetir entradas en la base de datos
texto (EL FORMULARIO)
id_user (EL FORMULARIO) Clave foranea a la tabla usuarios
fecha - date() o dia de creación
leer (boolean) 1 leido | 0 no leido
b) Now if with the data that comes from the form sent, we keep them in this table and the logic that we should do to save them would be.
"id" de la notificación será autoincremental desde 1 hasta 99999...
"texto" será el que escribamos en el formulario de administración Input
"id_user" será el id del cliente del formulario de administración Input
"fecha" será la fecha del dia que creamos el mensaje y lo enviamos date()
'leer' es un booleano que por defecto estará en "0" (no leido) y "1" (leido).
3º The views of the client from his user panel (registered and logged)
You can place this where you want, as you say above in 1 icon, in the navigation bar you can do the logic of:
* Query to the database:
{Busca los mensajes en la tabla "notificaicones_usuarios" con el parametro de "leer en 0" y con la "id de usuario logeado".}
And this query you do the typical count (QUERY) and count how many entries with those parameters exist or have obtained with those parameters.
That is, how many unread messages the specific client has.
And so you paint the shtick on the icon. of client views.
Well up here would be what you want, and so far I offer you because this way of "help" is that some will not agree, because it is "hard / arduous" to read logic, but not forget that the one who is going to read it is the interested one. Being in place 1 year and a half ago ... it would have been good for me to explain something like that when I had my complex doubts as a beginner. And because of that, I help you up to where you directly ask your solution.
Give more personalization to what you ask would seem obvious .. but not necessary in your case, with understanding this logic and achieve it for yourself ... it will be a big step and advance for you. Courage!
I hope you will help Mr. Cesar Gutierrez Davalos; D
PS: The reason for not doing the code is that as you said, you did not know how to start, and here we are to help solve a question or problem, but not to perform all the code of another from 0, with all the respect your question, I understand you and I give you a solution to how to start chopping the code. Simply, now that you have a logic to start programming, try to do it and if you have code problems I invite you to ask again in this community contributing what has already been done by you and thus be able to find the fault / doubt.