Download the PHP package fanmade/laravel-service-binding without Composer
On this page you can find all versions of the php package fanmade/laravel-service-binding. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fanmade/laravel-service-binding
More information about fanmade/laravel-service-binding
Files in fanmade/laravel-service-binding
Package laravel-service-binding
Short Description Provide configuration to allow service and repository binding and switching between them via environment variables
License MIT
Homepage https://github.com/Fanmade/laravel-service-binding
Informations about the package laravel-service-binding
EARLY WORK IN PROGRESS, WOULD NOT RECOMMEND USING IT YET
Laravel Service Binding
Laravel does provide all necessary tools to allow using service or repository binding. Just bind it in the service provider and you're good to go.
Now if you created an ElasticSearchFooSearchService
and you did everything properly, you only have to change the binding and everything should work fine.
But there are several reasons why you might use different services on different systems and that can get messy quickly. You also can't switch between different repositories without altering code :(
Maybe you start using if
/else
in the service provider now.
Or you switch to Symfony where that's not a problem because you only have to update your configuration files.
This package here does try to provide a solution for Laravel applications.