It is from your dashboard example
protected function login(
{
return Login::create()->
->headerText("Login")
->descriptionText("Sign in to your account")
->buttonText("Login")
->failedText("Wrong username or password")
->rightImageUrl("/assets/login/image.jpg");
->authenticate(function($uername,$password){
//You can make database connection in here to authenticate $username or password
//Return User class when it is authenticated
if($username==="johndoe" && $password==="johndoe") {
return User::create()
->name("John Doe")
->id(1)
->roles(["guest"]);
}
return null;
})
}