Last active
January 3, 2016 05:09
-
-
Save coreymcmahon/8414120 to your computer and use it in GitHub Desktop.
Building Testable Applications using the Repository Pattern - http://www.slashnode.com/the-repository-pattern/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php namespace Acme\Storage\Eloquent; | |
| use Illuminate\Support\ServiceProvider; | |
| class StorageServiceProvider extends ServiceProvider { | |
| public function register() | |
| { | |
| // tells the IoC container that when we request an instance of PostRepositoryInterface, | |
| // it should instantiate and return Acme\Storage\Eloquent\PostRepository | |
| $this->app->bind( | |
| 'Acme\Storage\PostRepositoryInterface', | |
| 'Acme\Storage\Eloquent\PostRepository' | |
| ); | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment