Laravel debounced jobs: only the last dispatch runs
Dispatch a job 10 times in 30 seconds and only the last one runs. #[DebounceFor] for queued jobs and listeners, with maxWait. Laravel 13.6+. 20 Pest tests.
Dispatch a job 10 times in 30 seconds and only the last one runs. #[DebounceFor] for queued jobs and listeners, with maxWait. Laravel 13.6+. 20 Pest tests.
Cache::rememberWithWarmth() returns the value and a warm flag, so you can send an X-Cache header or count misses. Laravel 13.15+. 15 Pest tests.
Cache::memo() reads a key once and serves it from memory for the rest of the request or job. Tags work since Laravel 13.33. 15 Pest tests.
Format 1,230,000 as 1.23 million or 1.23M in PHP, before Vue ever sees the raw count. Default precision rounds 1,500 to 2 thousand. 23 Pest tests.
A username can be an email or a handle. Rule::anyOf() passes if any one ruleset fully matches, and rejects everything else. 22 Pest tests.
One call runs a closure once at a time across workers, another allows at most N, on any lock store. 25 Pest tests and 6 real processes.
wherePivot() filters approved members, but attach() leaves approved at 0. withPivotValue() stamps the pivot on attach, create and sync. 18 Pest tests.
Hidden gem: hasOne()->latestOfMany() eager loads one order per customer instead of every order. Plus ofMany() closures, whereRelation, and the id trap. 17 Pest tests.
Hidden gem: a drafts() relation built with withAttributes() filters reads and sets status on create, make, save and factories. 15 Pest tests inside.
A rate-limited API returns 429. What happens to your queued job? We ran a real database queue worker to see how release(), Tries, MaxExceptions, Backoff and retryUntil interact. 6 tests.
Build a Laravel MCP server with laravel/mcp: tools with schemas and validation, Sanctum tokens, per-user tools, a Vue page that issues the token, and tests. 11 tests.
Add search to a Laravel + Vue app with Scout's database engine: LIKE, prefix and Postgres full-text columns, relevance ranking and an Inertia search page. 10 tests on PostgreSQL 18.
Hidden gem: swap sleep() for Laravel's Sleep class and your retry, backoff and polling tests run in milliseconds and assert every wait. 19 Pest tests inside.
Hidden gem: Http::pool() sends outgoing API calls at the same time, so three 500 ms calls take 0.5 s, not 1.5 s. Plus Http::batch() and 6 gotchas we tested.
Hidden gem: once() runs a closure one time per object and returns the cached result after that. One line replaces private cache properties, plus 5 gotchas we tested.
Hidden gem: whereAny() searches many columns in one grouped call, so a chained orWhere can't leak other teams' rows. Plus whereAll, whereNone and 4 gotchas.
Hidden gem: add chaperone() to a hasMany and every child gets its parent for free. 22 queries became 2 in our Laravel 13.38 lab.
Hidden gem: one line turns dropped fields, typo'd attributes and N+1 queries into loud errors in development. Tested on Laravel 13.38.
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two critical unauthenticated remote code execution bugs (CVSS 9.2). What happened, who is exposed, and how to patch Laravel servers on Docker, Forge, Vapor, Cloud and Coolify.
Hidden gem: Concurrency::run() runs closures in child PHP processes and returns all results together. Measured gains, the ~200 ms overhead, and the one-closure-per-line trap. Tested on Laravel 13.37.
Hidden gem: the Context facade stamps a request id, user and route on every log line and carries them into queued jobs. Hidden values stay out of logs. Tested on Laravel 13.37.
Hidden gem: one line in AppServiceProvider turns every forgotten with() into one batched query. 51 queries became 2 in our Laravel 13.37 test.
Hidden gem: Cache::flexible serves slightly stale data instantly and refreshes after the response. No user waits on a cache miss. Tested on Laravel 13.35.
Hidden gem: Laravel's defer() runs CRM syncs, webhooks and analytics after the user gets their page. No queue worker, one line. Tested on Laravel 13.35.
Three ways to export a CSV from a Laravel + Vue app: stream it with lazyById, write it in a queued job, and avoid the chunk() bug and formula injection. 7 tests.
Use Laravel signed URLs for email links, teammate invites and expiring downloads in a Laravel + Vue app, plus the proxy bug that turns valid links into 403s. 7 tests.
Move Inertia form rules into a Laravel form request, then handle the rules every app needs: unique on update, password confirmation, PHP enums and a custom rule.
PHP versions, extensions, Node.js, databases and the packages worth knowing: a practical checklist for a modern Laravel + Vue stack, and how it compares with the stack this site started on.
Newsletter
One short email with new guides, release notes worth reading and hand-picked community links. No spam, unsubscribe any time.