'required|string|min:3', 'password' => 'required|string', ]; public function submit() { $this->validate(); $cred = [ 'username' => $this->username, 'password' => $this->password ]; if (!Auth::attempt($cred)) { session()->flash('message', __('auth.failed')); return; } return redirect()->intended('/admin'); } /** * Render the setup page */ public function render() { return view('form.login'); } }