feat: mobile regist and login

This commit is contained in:
2026-05-22 16:35:07 +02:00
parent 9fe51e8064
commit 055ebbf658
9 changed files with 248 additions and 88 deletions
+8
View File
@@ -28,6 +28,8 @@ class RegisterRequest extends FormRequest
public function rules(): array
{
return [
'deviceName' => ['sometimes', 'string', 'max:255'],
'device_name' => ['sometimes', 'string', 'max:255'],
'name' => [
'required',
'string',
@@ -72,6 +74,12 @@ class RegisterRequest extends FormRequest
'locale' => $this->normalizeLocale((string) $this->input('locale')),
]);
}
if ($this->has('deviceName') && ! $this->has('device_name')) {
$this->merge([
'device_name' => $this->input('deviceName'),
]);
}
}
private function normalizeLocale(string $locale): string