Faizan Afzal
Faizan Afzal

Reputation: 407

How to add Google-Api-Php-Client library in Laravel 4.2?

I'm trying to build an application using Google API. However, I managed to make it to work in CorePHP. But I'm not able to integrate the Google API PHP client library in laravel 4.2. Can anybody guide me ?

Upvotes: 2

Views: 3613

Answers (1)

Javi Stolz
Javi Stolz

Reputation: 4753

Google Api Client is available via composer. To add it to your Laravel simply run this command in your base Laravel dir

composer require google/apiclient

Now you can use the google client library in your controller or any other part of laravel

$google_client = new Google_Client();
$google_client->setApplicationName('YOUR APPLICATION NAME');
$google_client->setClientId('YOUR CLIENT ID');
$google_client->setClientSecret('SECRET');

Upvotes: 2

Related Questions