feat: mobile regist and login
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user