Commit workspace changes
This commit is contained in:
@@ -19,6 +19,8 @@ use cPad\Plugins\Forum\Models\ForumBoard;
|
||||
use cPad\Plugins\Forum\Models\ForumCategory;
|
||||
use cPad\Plugins\Forum\Models\ForumTopic;
|
||||
use cPad\Plugins\News\Models\NewsArticle;
|
||||
use cPad\Plugins\News\Models\NewsCategory;
|
||||
use cPad\Plugins\News\Models\NewsTag;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
final class SitemapUrlBuilder extends AbstractSitemapBuilder
|
||||
@@ -161,6 +163,30 @@ final class SitemapUrlBuilder extends AbstractSitemapBuilder
|
||||
);
|
||||
}
|
||||
|
||||
public function newsCategory(NewsCategory $category): ?SitemapUrl
|
||||
{
|
||||
if (trim((string) $category->slug) === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new SitemapUrl(
|
||||
route('news.category', ['slug' => $category->slug]),
|
||||
$this->newest($category->updated_at, $category->created_at),
|
||||
);
|
||||
}
|
||||
|
||||
public function newsTag(NewsTag $tag): ?SitemapUrl
|
||||
{
|
||||
if (trim((string) $tag->slug) === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new SitemapUrl(
|
||||
route('news.tag', ['slug' => $tag->slug]),
|
||||
$this->newest($tag->updated_at, $tag->created_at),
|
||||
);
|
||||
}
|
||||
|
||||
public function forumIndex(): SitemapUrl
|
||||
{
|
||||
return new SitemapUrl(route('forum.index'));
|
||||
|
||||
Reference in New Issue
Block a user