From 103e49bc3fce525f505a3a0b5280aad17055884d Mon Sep 17 00:00:00 2001 From: Lars Klopstra Date: Thu, 27 May 2021 11:26:49 +0200 Subject: [PATCH 1/6] Update meta.blade.php --- assets/views/components/meta.blade.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/views/components/meta.blade.php b/assets/views/components/meta.blade.php index 7372978..b2f7ace 100644 --- a/assets/views/components/meta.blade.php +++ b/assets/views/components/meta.blade.php @@ -2,7 +2,10 @@ @if(seo('site')) @endif @if(seo('title')) @endif -@if(seo('description')) @endif +@if(seo('description')) + + +@endif @if(seo('image')) @endif @if(seo('url')) From d5f1334751a8edd8b7deba7ec7bb6fa29dca6fc9 Mon Sep 17 00:00:00 2001 From: Lars Klopstra Date: Thu, 27 May 2021 14:11:05 +0200 Subject: [PATCH 2/6] Update meta.blade.php --- assets/views/components/meta.blade.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/views/components/meta.blade.php b/assets/views/components/meta.blade.php index b2f7ace..076611d 100644 --- a/assets/views/components/meta.blade.php +++ b/assets/views/components/meta.blade.php @@ -1,7 +1,9 @@ -@seo('title') @if(seo('site')) @endif -@if(seo('title')) @endif +@if(seo('title')) + @seo('title') + +@endif @if(seo('description')) From 6c2cd50cbfe219f36ced3993f5ccc81293822b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 27 May 2021 15:45:58 +0200 Subject: [PATCH 3/6] reorg --- assets/views/components/meta.blade.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/views/components/meta.blade.php b/assets/views/components/meta.blade.php index 076611d..3998ea6 100644 --- a/assets/views/components/meta.blade.php +++ b/assets/views/components/meta.blade.php @@ -1,14 +1,19 @@ - -@if(seo('site')) @endif @if(seo('title')) @seo('title') @endif + @if(seo('description')) @endif + + + +@if(seo('site')) @endif + @if(seo('image')) @endif + @if(seo('url')) From 9087c1dbc6d5c2158e641331094877255c183831 Mon Sep 17 00:00:00 2001 From: Charlie J Date: Thu, 27 May 2021 21:16:33 +0100 Subject: [PATCH 4/6] Add extra information to docblocks Prevents PHPStorm complaining. --- src/SEOManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SEOManager.php b/src/SEOManager.php index 82f42b9..ce3ea16 100644 --- a/src/SEOManager.php +++ b/src/SEOManager.php @@ -8,7 +8,7 @@ use Closure; use Illuminate\Support\Str; /** - * @method $this title(string $title) Set the title. + * @method $this title(string $title = null, ...$args) Set the title. * @method $this description(string $description) Set the description. * @method $this url(string $url) Set the canonical URL. * @method $this site(string $site) Set the site name. From 4b9b6e7eea49ee420c08f7fd00083f7a5fb71952 Mon Sep 17 00:00:00 2001 From: Charlie J Date: Thu, 27 May 2021 21:29:31 +0100 Subject: [PATCH 5/6] Add handling for other magic methods --- src/SEOManager.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/SEOManager.php b/src/SEOManager.php index ce3ea16..50e7f98 100644 --- a/src/SEOManager.php +++ b/src/SEOManager.php @@ -9,15 +9,15 @@ use Illuminate\Support\Str; /** * @method $this title(string $title = null, ...$args) Set the title. - * @method $this description(string $description) Set the description. - * @method $this url(string $url) Set the canonical URL. - * @method $this site(string $site) Set the site name. - * @method $this image(string $url) Set the cover image. - * @method $this twitter(enabled $bool = true) Enable the Twitter extension. - * @method $this twitterSite(string $username) Set the Twitter author. - * @method $this twitterTitle(string $title) Set the Twitter title. - * @method $this twitterDescription(string $description) Set the Twitter description. - * @method $this twitterImage(string $url) Set the Twitter cover image. + * @method $this description(string $description = null, ...$args) Set the description. + * @method $this url(string $url = null, ...$args) Set the canonical URL. + * @method $this site(string $site = null, ...$args) Set the site name. + * @method $this image(string $url = null, ...$args) Set the cover image. + * @method $this twitter(enabled $bool = true = null, ...$args) Enable the Twitter extension. + * @method $this twitterSite(string $username = null, ...$args) Set the Twitter author. + * @method $this twitterTitle(string $title = null, ...$args) Set the Twitter title. + * @method $this twitterDescription(string $description = null, ...$args) Set the Twitter description. + * @method $this twitterImage(string $url = null, ...$args) Set the Twitter cover image. */ class SEOManager { From b4ef3dacd2b87a9588ce7f23880e78455119845b Mon Sep 17 00:00:00 2001 From: Charlie J Date: Thu, 27 May 2021 21:32:59 +0100 Subject: [PATCH 6/6] Fixed twitter $bool with invalid code --- src/SEOManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SEOManager.php b/src/SEOManager.php index 50e7f98..b512a07 100644 --- a/src/SEOManager.php +++ b/src/SEOManager.php @@ -13,7 +13,7 @@ use Illuminate\Support\Str; * @method $this url(string $url = null, ...$args) Set the canonical URL. * @method $this site(string $site = null, ...$args) Set the site name. * @method $this image(string $url = null, ...$args) Set the cover image. - * @method $this twitter(enabled $bool = true = null, ...$args) Enable the Twitter extension. + * @method $this twitter(enabled $bool = true, ...$args) Enable the Twitter extension. * @method $this twitterSite(string $username = null, ...$args) Set the Twitter author. * @method $this twitterTitle(string $title = null, ...$args) Set the Twitter title. * @method $this twitterDescription(string $description = null, ...$args) Set the Twitter description.