Implement academy analytics, billing, and web stories updates

This commit is contained in:
2026-05-26 07:27:29 +02:00
parent 456c3d6bb0
commit 0b33a1b074
177 changed files with 27360 additions and 2685 deletions

View 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(),
];
}
}