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,50 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Artwork;
use App\Models\WorldWebStory;
use App\Models\WorldWebStoryPage;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<WorldWebStoryPage>
*/
class WorldWebStoryPageFactory extends Factory
{
protected $model = WorldWebStoryPage::class;
public function definition(): array
{
return [
'story_id' => WorldWebStory::factory(),
'artwork_id' => null,
'position' => 1,
'layout' => WorldWebStoryPage::LAYOUT_ARTWORK,
'background_type' => WorldWebStoryPage::BACKGROUND_IMAGE,
'background_path' => 'web-stories/worlds/example/pages/page-01.webp',
'background_mobile_path' => 'web-stories/worlds/example/pages/page-01.webp',
'headline' => 'Story headline',
'body' => 'Short supporting copy for this world web story page.',
'cta_label' => null,
'cta_url' => null,
'alt_text' => 'World story background',
'caption' => 'Skinbase World',
'credit_text' => null,
'text_position' => 'bottom',
'overlay_strength' => 35,
'animation' => 'fade-in',
'active' => true,
];
}
public function withArtwork(): self
{
return $this->state(fn (): array => [
'artwork_id' => Artwork::factory(),
'layout' => WorldWebStoryPage::LAYOUT_ARTWORK,
]);
}
}