spatie/once
A tiny PHP helper to run code only once per request. Cache expensive computations or object initialization in a single spot, keyed automatically by the call site. Great for computed properties, accessors, and avoiding duplicate work.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| spatie/sun | 0.88 | Compute sun position times for any coordinates: get sunrise, solar noon (zenith), and sunset as Carbon instances, optionally for a specific date. Simple PHP API from Spatie, ideal for scheduling, dashboards, and daylight-aware features. | 73 | 75 | 14 | 5K | 0 | 23.5 | 29.9 | MIT | 4 months ago | |
| spatie/url | 0.86 | Immutable URL parser/builder for PHP. Parse scheme, host, path and query, then fluently transform parts (withHost, withPath, withScheme) and manage query parameters. Supports allowed/sanitized schemes for safer URL handling. | 739 | 753 | 60 | 439K | 0 | 32.4 | 45.1 | MIT | 2 years ago | |
| spatie/period | 0.83 | Immutable date period objects for PHP with powerful comparison tools. Create periods from any DateTime (including Carbon), then calculate overlaps, gaps, intersections, differences, containment, and other complex comparisons across two or many periods. | 1,691 | 1,694 | 76 | 129K | 0 | 39.7 | 30.7 | MIT | 3 years ago | |
| spatie/blink | 0.82 | spatie/blink is a tiny in-memory cache for PHP apps. Store values for the current request to avoid repeated work like duplicate queries or expensive calculations. Simple API, no persistence—perfect for per-request memoization in Laravel and beyond. | 167 | 168 | 18 | 167K | 0 | 25.0 | 48.7 | MIT | 2 years ago | |
| spatie/laravel-blink | 0.77 | Request-scoped in-memory cache for Laravel. Use the blink() helper or facade to store and retrieve values for the duration of a single request, with helpers like once(), get/put, wildcard key prefixes, increment, forget/flush, plus ArrayAccess and Countable support. | 162 | 163 | 14 | 35K | 0 | 27.2 | 37.9 | MIT | 1 month ago | |
| aimeos/map | 0.76 | High-performance e-commerce framework for Laravel/Lumen (and other PHP apps). Provides products, catalog, basket, checkout, customers, orders and admin UI. Extensible via plugins, supports multiple shops/sites, currencies and languages, and scales well. | 4,245 | 4,234 | 16 | 14K | 1 | 21.8 | 8.6 | MIT | — | |
| spatie/pest-expectations | 0.75 | Add expressive, chainable expectations to Pest tests with Spatie’s helpers. Provides handy assertion-style methods for cleaner, more readable tests, letting you validate values, types, strings, arrays, and more with minimal boilerplate. | 78 | 78 | 4 | 6K | 0 | 27.4 | 30.9 | MIT | 1 month ago | |
| spatie/pest-plugin-snapshots | 0.75 | Add snapshot testing to Pest. Assert strings, JSON, and more against stored snapshots using helper functions or Pest expectations like toMatchSnapshot(). Built on Spatie’s phpunit-snapshot-assertions for easy, reliable regression testing. | 38 | 39 | 11 | 40K | 0 | 23.0 | 49.0 | MIT | 2 months ago | |
| spatie/test-time | 0.74 | Control time in tests with Spatie TestTime—freeze or advance Carbon-based timestamps dynamically for time-sensitive assertions. Simplify testing date-dependent logic by manually adjusting time without altering real-world clocks. Works seamlessly with Carbon’s methods like addYear(), subDay(), or cus... | 208 | 208 | 10 | 160K | 0 | 25.2 | 46.9 | MIT | 2 years ago | |
| spatie/phpunit-snapshot-assertions | 0.72 | Add snapshot testing to PHPUnit with simple assertions for JSON, XML, and text. First run creates snapshots; later runs compare outputs and fail on regressions. Ideal for verifying serialized data and responses with minimal test boilerplate. | 695 | 699 | 77 | 608K | 1 | 34.9 | 47.8 | MIT | 1 month ago | |
| spatie/fractalistic | 0.71 | Developer-friendly wrapper around League Fractal to transform API data with less boilerplate. Build resources, apply transformers, includes, and output arrays with a fluent API or one-liner syntax. Great for PHP projects; Laravel users may prefer laravel-fractal. | 385 | 387 | 34 | 275K | 0 | 31.3 | 46.4 | MIT | 1 month ago | |
| spatie/array-functions | 0.71 | Handy PHP array utilities from Spatie. Adds small, focused functions in the Spatie namespace (e.g., array_rand_value to pick a random value) to complement built-in array helpers. Install via Composer and use directly in your code. | 245 | 249 | 40 | 953 | 0 | 26.6 | 11.2 | MIT | 1 year ago | |
| spatie/value-object | 0.71 | Deprecated Spatie package for PHP 8+ data transfer objects. Create typed DTOs from arrays with casting, validation, and attribute mapping (e.g., nested keys). Consider migrating to spatie/laravel-data or cuyz/valinor. | 2,233 | 2,179 | 190 | 0 | 0 | 22.9 | — | MIT | 3 years ago | |
| spatie/laravel-binary-uuid | 0.71 | NOT MAINTAINED. Store UUID primary keys as optimized binary in Laravel models for faster indexing/queries (MySQL/SQLite). Provides UUID generation and Eloquent trait/scopes to encode/decode and query by UUID, plus benchmarks to compare performance. | 521 | 524 | 57 | 39 | 0 | 14.4 | 0.5 | MIT | 7 years ago | |
| spatie/async | 0.71 | Run PHP tasks in parallel with a simple Pool API built on PCNTL. Add closures, handle results via then/catch, and wait for completion. Ideal for speeding up batch jobs, CPU-heavy work, and IO-bound processing with multiple processes. | 2,812 | 2,818 | 185 | 160K | 0 | 48.3 | 28.6 | MIT | 1 month ago |
How can I help you explore Laravel packages today?