diff --git a/src/Torann/LaravelMetaTags/MetaTag.php b/src/Torann/LaravelMetaTags/MetaTag.php index d346c9e..0a53fd7 100644 --- a/src/Torann/LaravelMetaTags/MetaTag.php +++ b/src/Torann/LaravelMetaTags/MetaTag.php @@ -3,6 +3,7 @@ namespace Torann\LaravelMetaTags; use Illuminate\Http\Request; +use Illuminate\Support\Arr; class MetaTag { @@ -127,7 +128,7 @@ public function tag($key, $value = '') { return $this->createTag([ 'name' => $key, - 'content' => $value?:$this->metas[$key] + 'content' => $value ?: Arr::get($this->metas, $key, '') ]); }