laravel-macroable-models icon indicating copy to clipboard operation
laravel-macroable-models copied to clipboard

Using scoped instead of singleton

Open l3aro opened this issue 1 year ago • 0 comments

The scoped method binds a class or interface into the container that should only be resolved one time within a given Laravel request / job lifecycle. While this method is similar to the singleton method, instances registered using the scoped method will be flushed whenever the Laravel application starts a new "lifecycle", such as when a Laravel Octane worker processes a new request or when a Laravel queue worker processes a new job

l3aro avatar Oct 04 '24 04:10 l3aro