Support the ongoing development of Laravel.io →
Database Jobs
Last updated 1 year ago.
0

your best bet (to optimize server resources) is to implement a timestamp column on the db record, and in the script where the user clicks the link to confirm, perform some logic that says "If DB timestamp is older than x minutes then reject" then just setup a cron job that runs every so often to prune the expired DB records. That way, you do not have a script CONSTANTLY running and checking/pruning the DB every 30 minutes. This is how the default laravel account confirmation works if I am not mistaken (without the cron pruning).

Last updated 9 years ago.
0

Thanks for your reply helped me a lot but is there a docu or a tutorial for this? I have never done this before with larval. So every time the user sends a confirmation link i have to check the table with an timer function is that right?

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

SmokeTm smoketm Joined 29 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.