---
title: "Enforce Per-Action Waiting Periods in Laravel with Cooldown"
url: https://daily.dev/posts/enforce-per-action-waiting-periods-in-laravel-with-cooldown-i43ru6dfm
source_url: https://laravel-news.com/enforce-per-action-waiting-periods-in-laravel-with-cooldown
type: article
source: "Laravel News"
published: 2026-07-16T13:30:48.965Z
updated: 2026-08-24T06:56:06.735Z
tags: ["php", "laravel"]
reading_time: 4
upvotes: 22
comments: 1
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Enforce Per-Action Waiting Periods in Laravel with Cooldown

**[Laravel News](https://daily.dev/sources/ln)** · 4 min read · 22 upvotes · 1 comments

## Summary

Laravel Cooldown is a package that enforces per-action, per-owner waiting periods in Laravel applications. Unlike the built-in RateLimiter which counts requests within a window, Cooldown tracks whether a specific named action for a specific owner is still within its waiting period. Key features include a fluent API for setting/checking/clearing cooldowns, an Eloquent HasCooldowns trait, route middleware, atomic locking via block() to prevent race conditions, a CooldownInfo object with human-readable remaining time, and support for both cache and database storage backends. The database backend is useful for critical actions like billing where cache flushes could remove locks. Requires PHP 8.2 and supports Laravel 11, 12, and 13.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/enforce-per-action-waiting-periods-in-laravel-with-cooldown>

## Community discussion

Top comments from developers on daily.dev.

**@jenueldev** · 2 upvotes

> Separating per-owner action cooldowns from request-rate limiting is a useful distinction, especially when business rules need to survive process restarts. The cache/database backend choice also makes consistency semantics explicit; for billing-like actions, it would be valuable to document how block() behaves across workers and what recovery looks like after a crashed lock holder.

## Similar posts on daily.dev

- [Laravel Quota: Usage Budgets for Calendar Periods](https://daily.dev/posts/laravel-quota-usage-budgets-for-calendar-periods-idwexf35e) · Laravel News · 39 upvotes · 2 comments
- [Why I Built an Application-Level Quota Manager for Laravel](https://daily.dev/posts/why-i-built-an-application-level-quota-manager-for-laravel-vkdcfqv00) · Medium · 4 upvotes · 0 comments
- [Laravel Lock: Distributed Locks for Models and Routes](https://daily.dev/posts/laravel-lock-distributed-locks-for-models-and-routes-2prsaaot3) · Laravel News · 26 upvotes · 5 comments

---

Tags: [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel)

[View this post on daily.dev](https://daily.dev/posts/enforce-per-action-waiting-periods-in-laravel-with-cooldown-i43ru6dfm)
