takeone-youtube-clone/resources/views/emails/new-user-registered.blade.php
ghassan 3fe167e33f Notify super admins on new user registration (bell + email)
When a new user registers, all super_admin users receive:
- A database notification shown in the bell (type: new_user), with the
  new user's avatar and a link to their channel
- An email congratulating them with the new member's name, email,
  join date, gender, and nationality, plus a View Profile CTA

Notification rendering in app.blade.php refactored into notifHref() and
notifThumb() helpers so new_user notifications link to /channel/{slug}
and show a circular avatar instead of a video thumbnail. Also fixed the
legacy /storage/thumbnails/ path to /media/thumbnails/ for video notifications.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 23:34:28 +03:00

52 lines
2.1 KiB
PHP

<x-emails.layout subject="New member joined TAKEONE">
{{-- Icon --}}
<div style="width:64px;height:64px;border-radius:50%;background:rgba(230,30,30,.12);border:1px solid rgba(230,30,30,.25);margin:0 auto 24px;text-align:center;line-height:64px;font-size:28px;">&#x1F389;</div>
<h1 class="email-title">New member joined!</h1>
<p class="email-subtitle">Someone just signed up to TAKEONE.</p>
<p class="email-text">Hi <strong style="color:#f1f1f1;">{{ $admin->name }}</strong>,</p>
<p class="email-text">
Congratulations a new member has just joined the platform! Here are their details:
</p>
{{-- Info box --}}
<div class="email-infobox">
<div class="email-infobox-label">New Member Details</div>
<div class="email-inforow">
<span class="email-inforow-key">Name</span>
<span class="email-inforow-val">{{ $newUser->name }}</span>
</div>
<div class="email-inforow">
<span class="email-inforow-key">Email</span>
<span class="email-inforow-val">{{ $newUser->email }}</span>
</div>
<div class="email-inforow">
<span class="email-inforow-key">Joined</span>
<span class="email-inforow-val">{{ $newUser->created_at->format('d M Y, H:i') }}</span>
</div>
<div class="email-inforow">
<span class="email-inforow-key">Gender</span>
<span class="email-inforow-val" style="text-transform:capitalize;">{{ $newUser->gender ?? '—' }}</span>
</div>
<div class="email-inforow">
<span class="email-inforow-key">Nationality</span>
<span class="email-inforow-val">{{ $newUser->nationality ?? '—' }}</span>
</div>
</div>
{{-- CTA --}}
<div class="email-btn-wrap">
<a href="{{ route('channel', $newUser->channel) }}" class="email-btn">&#x1F464;&nbsp; View Profile</a>
</div>
<hr class="email-divider">
<p class="email-note">
You are receiving this because you are a super admin on
<a href="{{ config('app.url') }}">{{ config('app.name') }}</a>.
</p>
</x-emails.layout>