Last active
December 19, 2017 13:47
-
-
Save HamidOsouli-zz/4c8ca3761726d772806139c29944d03e to your computer and use it in GitHub Desktop.
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
To bind a dependency to some class in laravel | |
$this->app->bind(‘App\Helpers\Stripe’, function($app){ | |
$api_key = config(‘services.stripe.api_key’); | |
return new \App\Helpers\Stripe($api_key); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment