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