Skip to content

Commit

Permalink
Upgrade to laravel5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpaulmedina committed Feb 11, 2018
1 parent 1814e01 commit edeffa8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "johnpaulmedina/laravel-usps",
"description": "USPS API for Laravel 5",
"description": "USPS API for Laravel 5.4",
"type": "library",
"keywords": ["usps","laravel","laravel5","laravel usps"],
"authors": [
Expand All @@ -16,7 +16,8 @@
"homepage":"https://github.com/johnpaulmedina/laravel-usps/",
"license": "MIT",
"require": {
"php": ">=5.4.0"
"php": ">=7.1.0",
"illuminate/support": "~5.4"
},
"autoload": {
"psr-0": {
Expand Down
9 changes: 6 additions & 3 deletions src/Usps/UspsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ class UspsServiceProvider extends ServiceProvider {
*/
public function register()
{
$this->app['usps'] = $this->app->share(function($app)
{

// Register manager for usage with the Facade.
$this->app->singleton('usps', function () {
$config = \Config::get('services.usps');
if (!array($config)) {
throw new \Exception('USPS: Invalid configuration defined in services.php.');
}
return new Usps($config);
});

}

/**
Expand Down

0 comments on commit edeffa8

Please sign in to comment.