Skip to content

Commit 9e7b501

Browse files
committed
updating for l5
1 parent dad44fd commit 9e7b501

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Google Api Client Wrapper
22
=========
33

4-
> Google api php client wrapper with Cloud Platform and Laravel support
4+
> Google api php client wrapper with Cloud Platform and Laravel 4 & 5 support
55
66
[![Build Status](http://img.shields.io/travis/pulkitjalan/google-apiclient.svg?style=flat-square)](https://travis-ci.org/pulkitjalan/google-apiclient)
77
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/pulkitjalan/google-apiclient/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/pulkitjalan/google-apiclient/)
@@ -42,7 +42,11 @@ Next add the following to the `aliases` array in your `config/app.php`
4242
'Google' => 'PulkitJalan\Google\Facades\Google'
4343
```
4444

45-
Finally run `php artisan config:publish pulkitjalan/google-apiclient` to publish the config file.
45+
Finally run `php artisan vendor:publish --provider="pulkitjalan\google-apiclient\GoogleServiceProvider" --tag="config"` to publish the config file.
46+
47+
#### Looking for a Laravel 4 compatible version?
48+
49+
Checkout the [1.0 branch](https://github.com/pulkitjalan/google-apiclient/tree/1.0)
4650

4751
## Usage
4852

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pulkitjalan/google-apiclient",
3-
"description": "Google api php client wrapper with Cloud Platform and Laravel support",
3+
"description": "Google api php client wrapper with Cloud Platform and Laravel 4 & 5 support",
44
"homepage": "https://github.com/pulkitjalan/google-apiclient",
55
"keywords": ["laravel", "google", "cloud platform"],
66
"license": "MIT",
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": ">=5.4.0",
14-
"illuminate/support": "~4",
14+
"illuminate/support": "~5",
1515
"google/apiclient": "1.*"
1616
},
1717
"require-dev": {

src/GoogleServiceProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ public function boot()
2121
$this->app['PulkitJalan\Google\Client'] = function ($app) {
2222
return $app['google.api.client'];
2323
};
24+
25+
$this->publishes([
26+
__DIR__.'/config/config.php' => config_path('google.php'),
27+
], 'config');
2428
}
2529

2630
/**
@@ -30,10 +34,10 @@ public function boot()
3034
*/
3135
public function register()
3236
{
33-
$this->app->config->package('pulkitjalan/google-apiclient', realpath(__DIR__.'/config'), 'google');
37+
$this->mergeConfigFrom(__DIR__.'/config/config.php', 'google');
3438

3539
$this->app['google.api.client'] = $this->app->share(function () {
36-
return new Client($this->app->config->get('google::config'));
40+
return new Client(config('google'));
3741
});
3842
}
3943

0 commit comments

Comments
 (0)