Unknown Classes

Powerful classes that exist in Laravel but rarely appear in tutorials.

Intermediate Since 10.x

The Sleep Class

A testable, expressive wrapper around PHP's sleep functions with a fluent API.

Testing Helpers
Intermediate Since 10.x

The Lottery Class

Execute a callback with a given probability — perfect for sampling, feature flags, and A/B testing without external services.

Testing Helpers
Beginner Since 10.x

Benchmark::dd()

Time one or more closures and dump the results — the quickest way to compare performance of different approaches.

Performance Debugging
Intermediate Since 11.x

Cache::flexible()

Serve stale cache immediately while refreshing in the background — the stale-while-revalidate pattern built into Laravel.

Performance Caching