Dev.to Security 🔐 Cybersecurity 👁 0

Preventing Password Reuse in Laravel 🔐

Wrote up how I built laravel-password-history — a Composer package that stops users from recycling old passwords, using a polymorphic history table so it works with any Eloquent model, not just User. Covers the validati

Wrote up how I built laravel-password-history — a Composer package that stops users from recycling old passwords, using a polymorphic history table so it works with any Eloquent model, not just User.

Covers the validation rule, the auto-pruning logic, a scheduled cleanup command, and a service-provider bug I ran into (translations silently failing outside the console context).

📖 Full post: Article
📦 composer require devdasun/password-history
🔗 Repo

Feedback and PRs welcome, especially from anyone using non-standard auth setups.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.