Batch Registrar
Last updated
Was this helpful?
Last updated
Was this helpful?
It streamlines the process of binding interfaces to classes in batch. It leverages a binding process to the service container, ensuring clean and maintainable code within the service provider.
The package scans all .php
files in the specified registrar paths, identifies valid bindable paths, and binds them to the service container. It specifically looks for the BatchRegistrar
attribute. .
To use the batch binding feature, extend your service provider from CoreFoundationServiceProvider
and utilize the batchRegistrar
method.
Define your repository interface with the BatchRegistrar
attribute, indicating which class it should bind to.
Implement the repository interface to ensure it adheres to the specified structure.