PHPackages                             kly-infeed/gam - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kly-infeed/gam

ActiveLibrary

kly-infeed/gam
==============

KLY Infeed - Google Manager v1

v3.1(4y ago)0104[2 PRs](https://github.com/kly-infeed/gam/pulls)PHP

Since Sep 20Pushed 3y agoCompare

[ Source](https://github.com/kly-infeed/gam)[ Packagist](https://packagist.org/packages/kly-infeed/gam)[ RSS](/packages/kly-infeed-gam/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (27)Used By (0)

InFeed - Google AdManager
=========================

[](#infeed---google-admanager)

Installation
------------

[](#installation)

To get started, install Infeed Google AdManager via the Composer package manager: Add Infeed Google AdManager to your composer.json file.

```
require : {
    "kly-infeed/gam": "2.0"
}

```

Or with composer command:

```
composer require kly-infeed/gam

```

Add provider to your app/config/app.php providers

```
KLYinfeed\GAM\GamServiceProvider::class,

```

Publish config

```
php artisan vendor:publish

```

Add alias to app/config/app.php aliases

```
'GAM' => KLYinfeed\GAM\Facades\GAM::class,

```

Configuration
-------------

[](#configuration)

Before using Infeed Google AdManager, you will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your config/infeed\_gam.php configuration file, and should use the client\_id, client\_secret, redirect on the providers your application requires. For example:

```
return [
    //auth
    "client_id" => CLIENT_ID,
    "client_secret" => 'CLIENT_SECRET',
    "redirect" => 'http://your-site.com/callback',
    "access_token" => null,

    //cache
    "cache_enabled" => false,
    "cache_duration" => 3600, // Duration in minutes
    "cache_key_prefix" => "KLYinfeed.GAM.",
    "response_format" => "json", // json, xml
];

```

Routing
-------

[](#routing)

Next, you are ready to authenticate app! You will need two routes: one for redirecting the user to the OAuth provider, and another for receiving the callback from Infeed Google AdManager after authentication. We will access Infeed Google AdManager using the GAM facade:

```
