From 3f6c5db98d4705681ce6af2640ddf85500f7d0b9 Mon Sep 17 00:00:00 2001 From: tanhongit <35853002+tanhongit@users.noreply.github.com> Date: Mon, 13 Jan 2025 20:08:44 +0000 Subject: [PATCH] Fix styling --- src/Http/Controllers/MetaBoxController.php | 4 +++- src/Services/MetaBoxService.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Http/Controllers/MetaBoxController.php b/src/Http/Controllers/MetaBoxController.php index 8ffd92a..b532108 100644 --- a/src/Http/Controllers/MetaBoxController.php +++ b/src/Http/Controllers/MetaBoxController.php @@ -9,6 +9,7 @@ class MetaBoxController { protected MetaBoxService $metaBoxService; + protected SlugService $slugService; public function __construct(MetaBoxService $metaBoxService, SlugService $slugService) @@ -27,12 +28,13 @@ public function getMetaBoxBySlugModel(string $model, string $slug, string $lang return null; } + /** * @param string $model * @param int $modelId * @param string $lang * - * @return Model|null + * @return null|Model */ public function getMetaBoxByModel(string $model, int $modelId, string $lang = 'en'): ?Model { diff --git a/src/Services/MetaBoxService.php b/src/Services/MetaBoxService.php index 7e0e2e5..18ec085 100644 --- a/src/Services/MetaBoxService.php +++ b/src/Services/MetaBoxService.php @@ -14,6 +14,7 @@ class MetaBoxService protected function getSEOMetaBoxByModel(Model $model, string $lang = 'en'): ?Model { $metaKey = $lang === 'vi' ? 'seo_meta_vi' : 'seo_meta'; + return MetaBox::getMeta($model, $metaKey); }