has('socialite_user'); } /** * Get the validation rules that apply to the request. * * @return array> */ public function rules(): array { return [ 'username' => [ 'required', 'string', 'max:255', 'alpha_dash', function ($attribute, $value, $fail): void { if (User::whereRaw('LOWER(username) = ?', [strtolower($value)])->exists()) { $fail('The username has already been taken.'); } }, ], 'first_name' => ['required', 'string', 'max:255'], 'last_name' => ['required', 'string', 'max:255'], ]; } }