Skip to content

Commit

Permalink
Merge config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jono20201 committed Mar 14, 2018
1 parent 902eb9f commit 42fd13f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
10 changes: 9 additions & 1 deletion src/Frameworks/Laravel/DistanceMatrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@

use Illuminate\Support\Facades\Facade;

/**
* Class DistanceMatrix
*
* @package TeamPickr\DistanceMatrix\Frameworks\Laravel
*/
class DistanceMatrix extends Facade
{
/**
* @return string
*/
protected static function getFacadeAccessor()
{
return 'DistanceMatrix';
return \TeamPickr\DistanceMatrix\DistanceMatrix::class;
}
}
4 changes: 3 additions & 1 deletion src/Frameworks/Laravel/DistanceMatrixServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DistanceMatrixServiceProvider extends ServiceProvider
*/
public function register()
{
$this->app->singleton(DistanceMatrix::class, function () {
$this->app->bind(DistanceMatrix::class, function () {
return new DistanceMatrix($this->getLicense());
});
}
Expand All @@ -24,6 +24,8 @@ public function register()
*/
public function boot()
{
$this->mergeConfigFrom(__DIR__ . '/config.php', 'google');

$this->publishes([
__DIR__ . '/config.php' => config_path('google.php'),
], 'config');
Expand Down
10 changes: 0 additions & 10 deletions src/Frameworks/Laravel/config.php

This file was deleted.

10 changes: 10 additions & 0 deletions src/Frameworks/Laravel/google.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

return [
'license_type' => env('GOOGLE_LICENSE_TYPE', 'standard'),

'key' => env('GOOGLE_KEY', ''),

'client_id' => env('GOOGLE_CLIENT_ID', ''),
'encryption_key' => env('GOOGLE_ENCRYPTION_KEY', ''),
];

0 comments on commit 42fd13f

Please sign in to comment.