fix: allowing users to change artist display name.
This commit is contained in:
parent
c46664492d
commit
bf30235e1d
@ -107,6 +107,7 @@ public function update(Request $request, Artist $artist)
|
||||
'alby' => ['email'],
|
||||
'website' => ['url'],
|
||||
'nasocial' => ['starts_with:@'],
|
||||
'name' => ['string', 'unique:artists', 'max:255'],
|
||||
];
|
||||
$validator = Validator::make($request->all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
@ -118,6 +119,7 @@ public function update(Request $request, Artist $artist)
|
||||
$artist->alby = $request->alby;
|
||||
$artist->website = $request->website;
|
||||
$artist->nasocial = $request->nasocial;
|
||||
$artist->name = $request->name;
|
||||
if ($artist->isDirty()) {
|
||||
$artist->save();
|
||||
}
|
||||
|
@ -13,6 +13,11 @@
|
||||
<div class="col">
|
||||
<form method="post" action="/update-profile">
|
||||
@csrf
|
||||
<div>
|
||||
<x-input-label for="name" :value="__('Display Name')" />
|
||||
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full" :value="old('name', $user->artists->first()->name)" required autocomplete="name" />
|
||||
<x-input-error class="mt-2" :messages="$errors->get('name')" />
|
||||
</div>
|
||||
<div>
|
||||
<x-input-label for="location" :value="__('Location')" />
|
||||
<x-text-input id="location" name="location" type="text" class="mt-1 block w-full" :value="old('location', $user->artists->first()->location)" required autocomplete="location" />
|
||||
|
Loading…
Reference in New Issue
Block a user