Created
August 11, 2021 23:38
-
-
Save patrickcurl/869ddbdb7f04649604a3ac41a2a0f52b to your computer and use it in GitHub Desktop.
Laravel Breeze Tutorial LoginRequest.php -- rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
/** | |
* Get the validation rules that apply to the request. | |
* | |
* @return array | |
*/ | |
public function rules() | |
{ | |
return [ | |
'email' => | |
'required_without:username|string|email|exists:users,email', | |
'username' => | |
'required_without:email|string|exists:users,username', | |
'password' => 'required|string', | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment