Archived
1
0
Fork 0

Refactor UserController to ProfileController.

This commit is contained in:
Henrik Hautakoski 2021-07-20 15:38:57 +02:00
parent 5117907a4d
commit b76a997948
9 changed files with 23 additions and 23 deletions

View file

@ -1,43 +0,0 @@
<x-layout name="app">
<x-slot name="title">
<div class="flex">
{{ __('Edit User') }} - {{ $user->username }}
</div>
</x-slot>
<div class="mx-auto max-w-sm p-4">
<x-form action="{{ route('user.update') }}">
<div class="mb-2">
<x-form.label for="username">{{ __('Username') }}</x-form.label>
<x-input name="username" :value="$user->username" />
</div>
<x-section-heading>
<h2 class="text-2xl">Password</h2>
</x-section-heading>
<div class="mb-2">
<x-form.label for="current_password">{{ __('Current Password') }}</x-form.label>
<x-input-password name="current_password" />
</div>
<div class="mb-2">
<x-form.label for="password">{{ __('New Password') }}</x-form.label>
<x-input-password name="password" />
</div>
<div class="mb-2">
<x-form.label for="password_confirmation">{{ __('Confirm New Password') }}</x-form.label>
<x-input-password name="password_confirmation" />
</div>
<div class="mt-2">
<x-button element="input" type="submit" value="Save" />
</div>
</x-form>
</div>
</x-layout>

View file

@ -1,37 +0,0 @@
<x-layout name="app">
<x-slot name="title">
<div class="flex">
{{ __('User') }} - {{ $user->username }}
</div>
</x-slot>
<x-slot name="page_links">
<x-button element="a" class="flex items-center" href="{{ route('user.edit') }}">
<x-icon name="pencil" class="h-6 w-6 mr-1" /> {{ __('Edit') }}
</x-button>
</x-slot>
<div class="p-4">
<x-section-heading>
<h2 class="text-3xl">{{ __('Characters') }}</h2>
<div>
<x-button element="a" class="flex items-center" href="{{ route('character.create') }}">
<x-icon name="plus" class="h-6 h-6 mr-1"/> {{ __('Add character') }}
</x-button>
</div>
</x-section-heading>
@if ($user->characters->count())
<div class="grid md:grid-cols-2 lg:grid-cols-4 gap-4">
@foreach($user->characters as $character)
<x-character-card :character="$character" destroy="{{ route('character.destroy', [ 'character' => $character->slug ])}}"/>
@endforeach
</div>
@else
<x-empty-result title="No characters">Please add some of yours!</x-empty-result>
@endif
</div>
</x-layout>