mirror of
https://github.com/archtechx/laravel-seo.git
synced 2025-12-12 09:54:03 +00:00
Merge pull request #7 from szepeviktor/patch-1
Make seo function straight-forward
This commit is contained in:
commit
1b2bfb2945
1 changed files with 8 additions and 5 deletions
|
|
@ -7,12 +7,15 @@ use ArchTech\SEO\SEOManager;
|
||||||
if (! function_exists('seo')) {
|
if (! function_exists('seo')) {
|
||||||
function seo(string|array $key = null): SEOManager|string|array|null
|
function seo(string|array $key = null): SEOManager|string|array|null
|
||||||
{
|
{
|
||||||
if (! $key) {
|
if ($key === null) {
|
||||||
return app('seo');
|
return app('seo');
|
||||||
} elseif (is_array($key)) {
|
}
|
||||||
|
|
||||||
|
if (is_array($key)) {
|
||||||
return app('seo')->set($key);
|
return app('seo')->set($key);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
// String key
|
||||||
return app('seo')->get($key);
|
return app('seo')->get($key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue