fixing bugs in seo generate, fix bug set publish time in post, changes in import posts command, changes in pagination

This commit is contained in:
F4ilji
2025-04-19 15:07:29 +05:00
parent 1399e2b8de
commit 03aca1725b
10 changed files with 86 additions and 57 deletions
+5 -2
View File
@@ -14,7 +14,7 @@ class SeoPageProvider
{
return $model->seo?->toArray();
}
public function getSeoForCurrentPage(): ?array
public function getSeoForCurrentPage(): array|null
{
$path = $this->getCurrentPath();
@@ -23,8 +23,11 @@ class SeoPageProvider
now()->addHours(1),
fn() => Page::where('path', $path)->first()
);
if ($page) {
return $page->seo->toArray();
}
return $page->seo?->toArray();
return null;
}
private function getCurrentPath(): string