From 71f4c7230e289587d37de3d67123d3f19d29835e Mon Sep 17 00:00:00 2001 From: Emiliano Tisato Date: Fri, 19 Oct 2018 06:36:37 -0500 Subject: [PATCH] Changed env call in favor of config call to obtain api key --- README.md | 2 +- config/google-autocomplete.php | 7 +++++++ src/FieldServiceProvider.php | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 config/google-autocomplete.php diff --git a/README.md b/README.md index f1f1bc0..b4456b6 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Add the below to /resources/views/vendor/nova/layout.blade.php (this you can cop * To get results in specific language add `&language=en` to the below script url ```php - + ``` Add the below to your `.env` file diff --git a/config/google-autocomplete.php b/config/google-autocomplete.php new file mode 100644 index 0000000..85de34f --- /dev/null +++ b/config/google-autocomplete.php @@ -0,0 +1,7 @@ + env('ADDRESS_AUTOCOMPLETE_API_KEY', '') +]; \ No newline at end of file diff --git a/src/FieldServiceProvider.php b/src/FieldServiceProvider.php index a598edf..82d1c3d 100644 --- a/src/FieldServiceProvider.php +++ b/src/FieldServiceProvider.php @@ -19,6 +19,10 @@ public function boot() $this->publishes([ __DIR__.'/../resources/lang' => resource_path('lang/vendor/google-autocomplete'), ], 'google-autocomplete-lang'); + + $this->publishes([ + __DIR__.'/../config' => config_path(), + ], 'google-autocomplete-config'); }