Skip to content

Commit

Permalink
Fix validateForX compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarpsvo committed Dec 18, 2024
1 parent 8f81127 commit 38b8448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HandlesTranslatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected static function formatRules(NovaRequest $request, array $rules): array
})->all();
}

public static function validatorForCreation(NovaRequest $request)
public static function validatorForCreation(NovaRequest $request): \Illuminate\Contracts\Validation\Validator
{
// Get rules before $request->all() call
$rules = static::rulesForCreation($request);
Expand All @@ -82,7 +82,7 @@ public static function validatorForCreation(NovaRequest $request)
});
}

public static function validatorForUpdate(NovaRequest $request, $resource = null)
public static function validatorForUpdate(NovaRequest $request, $resource = null): \Illuminate\Contracts\Validation\Validator
{
// Get rules before $request->all() call
$rules = static::rulesForUpdate($request, $resource);
Expand Down

0 comments on commit 38b8448

Please sign in to comment.