I have been reading Laravel validation documentation. I am not clear how to combine two rules.
For example:
<input type="checkbox" name="has_login" value="1">
<input type="text" name="pin" value="">
If has_login checkbox is ticked then Input text pin value is required.
If has_login is not ticked then Input text pin is not required.
Laravel Validation:
public function rules()
{
return [
'has_login' => 'accepted',
'pin' => 'required',
];
}