diff --git a/composer.json b/composer.json index b0b6969..14d85e3 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "require": { "php": ">=5.3.0", - "illuminate/support": "4.x", + "illuminate/support": "5.0.*", "hashids/hashids": "1.0.x" }, "autoload": { diff --git a/src/Mitch/Hashids/HashidsServiceProvider.php b/src/Mitch/Hashids/HashidsServiceProvider.php index 0e5adf8..386d051 100644 --- a/src/Mitch/Hashids/HashidsServiceProvider.php +++ b/src/Mitch/Hashids/HashidsServiceProvider.php @@ -12,7 +12,9 @@ class HashidsServiceProvider extends ServiceProvider */ public function boot() { - $this->package('mitch/hashids'); + $configPath = __DIR__ . '/../../config/hashids.php'; + $this->mergeConfigFrom($configPath, 'hashids'); + $this->publishes([$configPath => config_path('hashids.php')]); } /** @@ -28,11 +30,11 @@ public function register() protected function registerHashids() { - $this->app->bind('Hashids\Hashids', function ($app) { + $this->app->bind('Hashids\Hashids', function () { return new Hashids( - $app['config']['app.key'], - $app['config']['hashids::length'], - $app['config']['hashids::alphabet'] + config('app.key'), + config('hashids.length'), + config('hashids.alphabet') ); }); } diff --git a/src/config/config.php b/src/config/hashids.php similarity index 100% rename from src/config/config.php rename to src/config/hashids.php