Add null-safe operator (?->) to handle nullable user instances in Blade templates

This commit is contained in:
HolgerHatGarKeineNode
2025-11-21 17:45:12 +01:00
parent c43dcd93c2
commit e36401a75c
3 changed files with 14 additions and 14 deletions

View File

@@ -68,8 +68,8 @@
</span>
<div class="grid flex-1 text-start text-sm leading-tight">
<span class="truncate font-semibold">{{ auth()->user()->name }}</span>
<span class="truncate text-xs">{{ auth()->user()->email }}</span>
<span class="truncate font-semibold">{{ auth()->user()?->name }}</span>
<span class="truncate text-xs">{{ auth()->user()?->email }}</span>
</div>
</div>
</div>