Archived
1
0
Fork 0

Formatting fixes.

This commit is contained in:
Henrik Hautakoski 2023-02-19 13:56:09 +01:00
parent 0437947c82
commit 86b9f3d2f0
7 changed files with 161 additions and 161 deletions

View file

@ -7,31 +7,31 @@ use Illuminate\Support\Facades\Auth;
class LoginForm extends Component
{
public $username;
public $username;
public $password;
public $password;
protected $rules = [
protected $rules = [
'username' => 'required|string|min:3',
'password' => 'required|string',
];
public function submit()
{
$this->validate();
public function submit()
{
$this->validate();
$cred = [
'username' => $this->username,
'password' => $this->password
];
$cred = [
'username' => $this->username,
'password' => $this->password
];
if (!Auth::attempt($cred)) {
session()->flash('message', __('auth.failed'));
return;
if (!Auth::attempt($cred)) {
session()->flash('message', __('auth.failed'));
return;
}
return redirect()->intended('/admin');
}
return redirect()->intended('/admin');
}
/**
* Render the setup page