Formatting fixes.
This commit is contained in:
parent
0437947c82
commit
86b9f3d2f0
7 changed files with 161 additions and 161 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue