Implement academy analytics, billing, and web stories updates
This commit is contained in:
47
app/Services/WebStories/WorldWebStorySeoService.php
Normal file
47
app/Services/WebStories/WorldWebStorySeoService.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services\WebStories;
|
||||
|
||||
use App\Models\WorldWebStory;
|
||||
use App\Support\Seo\SeoFactory;
|
||||
|
||||
final class WorldWebStorySeoService
|
||||
{
|
||||
public function __construct(private readonly SeoFactory $seo)
|
||||
{
|
||||
}
|
||||
|
||||
public function indexSeo(): array
|
||||
{
|
||||
return $this->seo->collectionListing(
|
||||
'Skinbase Web Stories',
|
||||
'Explore Skinbase Web Stories featuring digital art Worlds, wallpapers, creator highlights, seasonal collections, and visual stories from the Skinbase community.',
|
||||
route('web-stories.index'),
|
||||
)->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function storyMeta(WorldWebStory $story): array
|
||||
{
|
||||
$title = $story->seoTitle();
|
||||
$description = $story->seoDescription();
|
||||
|
||||
return [
|
||||
'title' => $title,
|
||||
'description' => $description,
|
||||
'canonical' => $story->publicUrl(),
|
||||
'robots' => $story->noindex ? 'noindex,follow' : 'index,follow,max-image-preview:large',
|
||||
'og_title' => $title,
|
||||
'og_description' => $description,
|
||||
'og_url' => $story->publicUrl(),
|
||||
'og_image' => (string) $story->posterPortraitUrl(),
|
||||
'twitter_title' => $title,
|
||||
'twitter_description' => $description,
|
||||
'twitter_image' => (string) $story->posterPortraitUrl(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user