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

@@ -6,6 +6,7 @@ use App\Models\Channel;
use App\Models\ChatMessage;
use App\Models\Vod;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Inertia\Inertia;
use Inertia\Response;
@@ -26,6 +27,9 @@ class ChannelController 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,
'followers_count' => $channel->follows_count,
@@ -84,4 +88,9 @@ class ChannelController extends Controller
: false,
]);
}
private function mediaUrl(?string $path): ?string
{
return $path ? Storage::url($path) : null;
}
}