Created
December 28, 2016 12:07
-
-
Save guiassemany/795dc1f6c199ab57f642bdba25a578e4 to your computer and use it in GitHub Desktop.
Pass constructor parameters when you're binding an interface to a class
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 | |
$this->app->bind('MasterUploader', function($app) use($your_parameter) | |
{ | |
// Make dependencies ... $any_dependancy_instance = $app->make('AnyDependancy'); etc... | |
return new EloquentUploader($any_dependancy_instance, $your_parameter); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment