#4-public-user-profile
This commit is contained in:
@@ -9,10 +9,17 @@
|
||||
<x-input-error :messages="$errors->get('name')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Username -->
|
||||
<div class="mt-4">
|
||||
<x-input-label for="username" :value="__('Username')" />
|
||||
<x-text-input id="username" class="block mt-1 w-full" type="text" name="username" :value="old('username')" required autocomplete="username" />
|
||||
<x-input-error :messages="$errors->get('username')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Email Address -->
|
||||
<div class="mt-4">
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autocomplete="username" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autocomplete="email" />
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
|
||||
24
resources/views/author/show.blade.php
Normal file
24
resources/views/author/show.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<x-guest-layout>
|
||||
<div class="space-y-6">
|
||||
<div class="space-y-2">
|
||||
<p class="text-sm font-medium text-indigo-600">{{ '@'.$author->username }}</p>
|
||||
<h1 class="text-2xl font-semibold text-gray-900">{{ $author->name }}</h1>
|
||||
<p class="text-sm text-gray-600">
|
||||
{{ __('Joined :date', ['date' => $author->created_at?->format('F j, Y')]) }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p class="text-xs font-medium uppercase tracking-wider text-gray-500">{{ __('Roles') }}</p>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
@forelse ($author->roles as $role)
|
||||
<span class="rounded-md bg-gray-100 px-2.5 py-1 text-sm text-gray-700">
|
||||
{{ $role->name }}
|
||||
</span>
|
||||
@empty
|
||||
<span class="text-sm text-gray-500">{{ __('No roles assigned.') }}</span>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-guest-layout>
|
||||
@@ -25,9 +25,15 @@
|
||||
<x-input-error class="mt-2" :messages="$errors->get('name')" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="username" :value="__('Username')" />
|
||||
<x-text-input id="username" class="mt-1 block w-full" type="text" name="username" :value="old('username', $user->username)" required autocomplete="username" />
|
||||
<x-input-error class="mt-2" :messages="$errors->get('username')" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="mt-1 block w-full" type="email" name="email" :value="old('email', $user->email)" required autocomplete="username" />
|
||||
<x-text-input id="email" class="mt-1 block w-full" type="email" name="email" :value="old('email', $user->email)" required autocomplete="email" />
|
||||
<x-input-error class="mt-2" :messages="$errors->get('email')" />
|
||||
</div>
|
||||
|
||||
@@ -67,4 +73,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</x-app-layout>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<tr>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Username</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Created</th>
|
||||
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
||||
@@ -25,6 +26,15 @@
|
||||
<tr class="odd:bg-white even:bg-gray-50">
|
||||
<td class="px-4 py-3 text-sm text-gray-700">{{ $user->id }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-900">{{ $user->name }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-700">
|
||||
@if ($user->username)
|
||||
<a href="{{ route('author.show', $user->username) }}" class="font-medium text-indigo-600 hover:text-indigo-500">
|
||||
{{ $user->username }}
|
||||
</a>
|
||||
@else
|
||||
<span class="text-gray-400">{{ __('Not set') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-700">{{ $user->email }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-700">{{ $user->created_at?->format('Y-m-d H:i') }}</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-700">
|
||||
@@ -35,7 +45,7 @@
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5" class="px-4 py-6 text-sm text-center text-gray-500">
|
||||
<td colspan="6" class="px-4 py-6 text-sm text-center text-gray-500">
|
||||
No users found.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user