Created
July 20, 2020 23:19
-
-
Save codemonkey76/b369266f1efec6850ad1d66caf420207 to your computer and use it in GitHub Desktop.
Provider
This file contains 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 App\Providers; | |
use App\Services\FusionApi; | |
use Illuminate\Contracts\Support\DeferrableProvider; | |
use Illuminate\Support\ServiceProvider; | |
class FusionApiProvider extends ServiceProvider implements DeferrableProvider | |
{ | |
/** | |
* Register services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
$this->app->bind('FusionApi',function() { | |
return new FusionApi( | |
config('fusionapi.api_base_url'), | |
config('fusionapi.api_user'), | |
config('fusionapi.api_password')); | |
}); | |
} | |
public function provides() | |
{ | |
return ['App\Services\FusionApi']; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment