PHP code example of crypto-technology / laravel-adsense

1. Go to this page and download the library: Download crypto-technology/laravel-adsense library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

crypto-technology / laravel-adsense example snippets


return [
    'client_id' => 'YOUR_CLIENT_ID', //Your Adsense client ID e.g. ca-pub-9508939161510421
    'ads' => [
        'responsive' => [
            'ad_unit_id' => 12345678901,
            'ad_format' => 'auto'
        ],
        'rectangle' => [
            'ad_unit_id' => 1234567890,
            'ad_style' => 'display:inline-block;width:300px;height:250px',
            'ad_format' => 'auto'
        ]
    ]
];



return [
    // ...
    'providers' => [
        CryptoTech\Laravel\Adsense\Providers\AdsenseServiceProvider::class,
        // ...
    ],
    // ...
];


// ...

$app = new Laravel\Lumen\Application(
    dirname(__DIR__)
);

// ...

$app->register(CryptoTech\Laravel\Adsense\Providers\AdsenseServiceProvider::class);

// ...

return $app;



return [
    // ...
    'aliases' => [
        'Adsense' => CryptoTech\Laravel\Adsense\Facades\AdsenseFacade::class,
        // ...
    ],
    // ...
];
shell
php artisan vendor:publish
shell
php artisan vendor:publish --provider="CryptoTech\Laravel\Adsense\Providers\AdsenseServiceProvider"