Skip to content

Commit

Permalink
feat(serviceProvider): use the facade
Browse files Browse the repository at this point in the history
  • Loading branch information
fnsc committed Feb 9, 2024
1 parent f1705fc commit 7d680d1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ public function boot(): void

private function registerRules(): void
{
$validator = $this->app->make(Validator::class);

foreach ($this->rules as $rule) {
$rule = $this->app->make($rule);
$alias = $rule->getAlias();
$validator->extend($alias, $rule . '@passes', $rule->message());
Validator::extend($alias, $rule . '@passes', $rule->message());
}
}
}

0 comments on commit 7d680d1

Please sign in to comment.