Answer the question
In order to leave comments, you need to log in
How to search the database for "overdue" tasks?
I am using Laravel. In the database there is a table with tasks. When creating a task, the user indicates to him the deadline for completion (deadline). So, you need to check for the expiration of these tasks in the database, and if there are any, update some fields. When and where should this be done? The user, when entering the page, should receive already updated tasks. I implemented this through middleware, before the controllers start working, it finds overdue tasks and updates them.
I'm not sure if this is the right thing to do, as there are a lot of features (queue, serviceproviders) that might be better for this. In addition, when a user enters his page, only his tasks are updated. And if I create an admin panel with a full table, will I have to create a new middleware?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question