Skip to content

Commit

Permalink
Merge pull request #27 from Carnicero90/main
Browse files Browse the repository at this point in the history
Update rule stub
  • Loading branch information
freekmurze authored Dec 21, 2023
2 parents 66aecc1 + cc140ca commit c3592fc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions stubs/rule.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

namespace {{ namespace }};

use Illuminate\Contracts\Validation\InvokableRule;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;

class {{ class }} implements InvokableRule
class {{ class }} implements ValidationRule
{
public function __invoke($attribute, $value, $fail)
/**
* Run the validation rule.
*
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
*/
public function validate(string $attribute, mixed $value, Closure $fail): void
{
// $fail('This rule failed');
//
}
}

0 comments on commit c3592fc

Please sign in to comment.