This commit is contained in:
2026-05-15 23:06:44 +03:30
parent 41789ec221
commit 97485b7a67
22 changed files with 1609 additions and 665 deletions

View File

@@ -8,6 +8,7 @@ use App\Models\Channel;
use App\Services\Streaming\StreamKeyManager;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
use Inertia\Inertia;
@@ -165,6 +166,9 @@ class CreatorDashboardController extends Controller
'slug' => $channel->slug,
'display_name' => $channel->display_name,
'description' => $channel->description,
'avatar_url' => $this->mediaUrl($channel->avatar_path),
'banner_url' => $this->mediaUrl($channel->banner_path),
'thumbnail_url' => $this->mediaUrl($channel->thumbnail_path),
'is_live' => $channel->is_live,
'viewer_count' => $channel->viewer_count,
'stream_key_last_used_at' => $channel->streamKey?->last_used_at?->toIso8601String(),
@@ -179,4 +183,9 @@ class CreatorDashboardController extends Controller
] : null,
];
}
private function mediaUrl(?string $path): ?string
{
return $path ? Storage::url($path) : null;
}
}