changed username to slug

This commit is contained in:
Doar Mihai
2026-05-30 23:47:32 +03:00
parent ece3070676
commit bdb4457e77
15 changed files with 77 additions and 46 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
@extends('layouts.app')
@section('title', ($user->username ?? $user->name) . "'s Library — GameLog")
@section('title', ($user->slug ?? $user->name) . "'s Library — GameLog")
@section('content')
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10">
@@ -8,8 +8,8 @@
<div class="flex items-center justify-between mb-8">
<div>
<h1 class="text-2xl font-bold text-white">
<a href="{{ route('users.show', $user->username) }}" class="hover:text-purple-400 transition-colors">
{{ $user->username ?? $user->name }}
<a href="{{ route('users.show', $user->slug) }}" class="hover:text-purple-400 transition-colors">
{{ $user->slug ?? $user->name }}
</a>'s Library
</h1>
</div>
@@ -21,7 +21,7 @@
$tabs = ['' => 'All', 'playing' => 'Playing', 'played' => 'Played', 'want_to_play' => 'Want to Play', 'on_hold' => 'On Hold', 'dropped' => 'Dropped'];
@endphp
@foreach($tabs as $tabStatus => $tabLabel)
<a href="{{ route('users.library', ['user' => $user->username, 'status' => $tabStatus ?: null]) }}"
<a href="{{ route('users.library', ['user' => $user->slug, 'status' => $tabStatus ?: null]) }}"
class="px-4 py-2 rounded-lg text-sm font-medium transition-colors
{{ $status === $tabStatus || (!$status && !$tabStatus)
? 'bg-purple-600 text-white'