Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Once Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package complements Laravel's existing caching layers by providing lightweight, per-request memoization. It's ideal for scenarios where repeated calculations within a single HTTP request can be optimized without the overhead of a full cache store (e.g., Redis). This aligns with Laravel's design philosophy of simplicity and performance.

Integration feasibility: High. The package is framework-agnostic and integrates seamlessly via Composer. Laravel's service container and dependency injection work without modification. Minimal code changes required (e.g., wrapping closures in Once::call()).

Technical risk: Potential memory bloat if memoizing large objects in long-running processes (e.g., queue workers

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope