From 3b2a8b51cfab1335215fdc1018cc5299891cb0e2 Mon Sep 17 00:00:00 2001 From: Maher Sakka Date: Wed, 30 Nov 2016 02:47:39 +0100 Subject: [PATCH 1/3] Add support for Laravel 5.3.* --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index eeb67b9..7672e86 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "keywords": [ "laravel", "adsense", "ads" ], "require": { "php": ">=5.4.0", - "illuminate/view": "5.0.*|5.1.*|5.2.*" + "illuminate/view": "5.0.*|5.1.*|5.2.*|5.3.*" }, "authors": [ { From 57982cdfe3b4bb73c4cc51140b8bf474e4bec470 Mon Sep 17 00:00:00 2001 From: Maher Sakka Date: Wed, 30 Nov 2016 02:49:29 +0100 Subject: [PATCH 2/3] Fix showing Ads Banner with fixed style --- src/AdsBuilder.php | 2 +- src/config/ads.php | 1 - src/views/ad.blade.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/AdsBuilder.php b/src/AdsBuilder.php index a7976ab..ae0ca38 100644 --- a/src/AdsBuilder.php +++ b/src/AdsBuilder.php @@ -8,7 +8,7 @@ public function show($name) { 'ad_client' => config("ads.client_id"), 'ad_style' => config("ads.ads.$name.ad_style", "display:block;"), 'ad_slot' => config("ads.ads.$name.ad_unit_id"), - 'ad_format' => config("ads.ads.$name.format", "auto") + 'ad_format' => config("ads.ads.$name.ad_format", null) ]); } } \ No newline at end of file diff --git a/src/config/ads.php b/src/config/ads.php index 730d7af..a2033ca 100644 --- a/src/config/ads.php +++ b/src/config/ads.php @@ -10,7 +10,6 @@ 'rectangle' => [ 'ad_unit_id' => 1234567890, 'ad_style' => 'display:inline-block;width:300px;height:250px', - 'ad_format' => 'auto' ] ] ]; diff --git a/src/views/ad.blade.php b/src/views/ad.blade.php index 35c6976..228353b 100644 --- a/src/views/ad.blade.php +++ b/src/views/ad.blade.php @@ -4,7 +4,7 @@ style="{!! $ad_style !!}" data-ad-client="{!! $ad_client !!}" data-ad-slot="{!! $ad_slot !!}" - data-ad-format="{!! $ad_format !!}"> + data-ad-format="{!! $ad_format !!}" > \ No newline at end of file From 1dcf592419e262df082c971c315829b282496482 Mon Sep 17 00:00:00 2001 From: Galen Han Date: Wed, 30 Nov 2016 15:05:17 +0000 Subject: [PATCH 3/3] Use blade syntax for ad.blade.php --- src/views/ad.blade.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/views/ad.blade.php b/src/views/ad.blade.php index 228353b..8ad1848 100644 --- a/src/views/ad.blade.php +++ b/src/views/ad.blade.php @@ -1,10 +1,14 @@ data-ad-format="{!! $ad_format !!}" > + style="{!! $ad_style !!}" + data-ad-client="{!! $ad_client !!}" + data-ad-slot="{!! $ad_slot !!}" + @if(isset($ad_format)) + data-ad-format="{!! $ad_format !!}" + @endif + > + \ No newline at end of file +