Hello,
I have to add a new functionality to a Laravel app : my client needs certain fields to be set automatically to null after some date only for some models.
For example in the clients table, he needs that only the birthdate and the SSN has to be set to null after 2022-10-31 only for John Doe.
Sure there will be some other clients for which it will be necessary.
How would be the better way to do that ?
I thought about this :
1 - add a json column in the table with the name of the fields to set to null and add another column with the date the datas have to be set to null
2 - add as many boolean fields as needed to specify the fields to set to null
Then a cron job to call the required method in a controller to run the query.
I think way 1 is best.
Perhaps you have another idea ?
Thanks.
Vincent