Skip to content

Instantly share code, notes, and snippets.

@maxheckel
Created April 4, 2017 17:44
Show Gist options
  • Select an option

  • Save maxheckel/35b7f234ef409a378349c96ca3226900 to your computer and use it in GitHub Desktop.

Select an option

Save maxheckel/35b7f234ef409a378349c96ca3226900 to your computer and use it in GitHub Desktop.
<?php
namespace App\Providers;
use App\Services\UPS;
use UPS\Client;
use Illuminate\Support\ServiceProvider;
class UPSServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
\App::bind('ups', function(){
$config = [
'username'=>env('UPS_USERNAME'),
'password'=>env('UPS_PASSWORD')
];
return new UPS(new Client($config));
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment