label('Логин')->required()->placeholder('Введите логин...'), TextInput::make('password')->label('Пароль') ->required()->password() ->dehydrated(fn ($state) => filled($state)) ->placeholder('Введите пароль...'), ]; } public function submit() { $state = $this->form->getState(); $user = User::query()->where('name', $state['name'])->first(); if (is_null($user)) { return redirect(); } if (Hash::check($state['password'], $user->password)) { Auth::login($user, true); return redirect('/'); } } public function render() { return view('livewire.login'); } }