@extends('layouts.app') @section('title', 'Profile | TAKEONE') @section('extra_styles') @endsection @php // If re-displaying after a validation error, rebuild from old() input $oldLinks = old('slink'); if ($oldLinks) { $socialExisting = collect($oldLinks) ->filter(fn($e) => !empty($e['platform']) && !empty($e['value'])) ->map(fn($e) => ['platform' => $e['platform'], 'value' => $e['value'], 'visibility' => $e['visibility'] ?? 'public']) ->values()->all(); } else { $socialExisting = $user->socialLinks()->orderBy('sort_order')->get() ->map(fn($l) => ['platform' => $l->platform, 'value' => $l->value, 'visibility' => $l->visibility]) ->all(); } @endphp @section('content')
@{{ $user->username }}
@endif @if($user->bio){{ $user->bio }}
@endif @if($user->hasSocialLinks()) @php $socialIconMap = [ 'twitter' => ['icon' => 'bi-twitter-x', 'class' => 'twitter', 'href' => fn($v) => "https://twitter.com/{$v}"], 'instagram' => ['icon' => 'bi-instagram', 'class' => 'instagram', 'href' => fn($v) => "https://instagram.com/{$v}"], 'facebook' => ['icon' => 'bi-facebook', 'class' => 'facebook', 'href' => fn($v) => "https://facebook.com/{$v}"], 'youtube' => ['icon' => 'bi-youtube', 'class' => 'youtube', 'href' => fn($v) => "https://youtube.com/@{$v}"], 'linkedin' => ['icon' => 'bi-linkedin', 'class' => 'linkedin', 'href' => fn($v) => "https://linkedin.com/in/{$v}"], 'tiktok' => ['icon' => 'bi-tiktok', 'class' => 'tiktok', 'href' => fn($v) => "https://tiktok.com/@{$v}"], 'whatsapp' => ['icon' => 'bi-whatsapp', 'class' => 'whatsapp', 'href' => fn($v) => "https://wa.me/" . preg_replace('/\D/', '', $v)], 'website' => ['icon' => 'bi-globe', 'class' => '', 'href' => fn($v) => preg_match('/^https?:\/\//', $v) ? $v : "https://{$v}"], 'google_location' => ['icon' => 'bi-geo-alt-fill', 'class' => 'googlemap', 'href' => fn($v) => $v], 'social_phone' => ['icon' => 'bi-telephone-fill', 'class' => '', 'href' => fn($v) => "tel:{$v}"], 'social_email' => ['icon' => 'bi-envelope-fill', 'class' => '', 'href' => fn($v) => "mailto:{$v}"], ]; @endphp @endifNo videos yet