PHP code example of martinbutt / laravel-adsense
1. Go to this page and download the library: Download martinbutt/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/ */
martinbutt / laravel-adsense example snippets
return [
'client_id' => 'YOUR_CLIENT_ID', //Your Adsense client ID e.g. ca-pub-9508939161510421
'ads' => [
'responsive' => [
'ad_slot' => 1111111111,
'ad_format' => 'fluid',
'ad_full_width_responsive' => true,
'ad_style' => 'display:inline-block'
],
'rectangle' => [
'ad_slot' => 2222222222,
'ad_style' => 'display:inline-block;width:300px;height:250px',
'ad_full_width_responsive' => false,
'ad_format' => 'auto'
]
]
];
return [
// ...
'providers' => [
MartinButt\Laravel\Adsense\Providers\AdsenseServiceProvider::class,
// ...
],
// ...
];
// ...
$app = new Laravel\Lumen\Application(
dirname(__DIR__)
);
// ...
$app->register(MartinButt\Laravel\Adsense\Providers\AdsenseServiceProvider::class);
// ...
return $app;
return [
// ...
'aliases' => [
'Adsense' => MartinButt\Laravel\Adsense\Facades\AdsenseFacade::class,
// ...
],
// ...
];
shell
php artisan vendor:publish
shell
php artisan vendor:publish --provider="MartinButt\Laravel\Adsense\Providers\AdsenseServiceProvider"