Skip to content

Commit

Permalink
Type-hint for code completion.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavpandeyvpz committed Aug 25, 2022
1 parent 29f91be commit f046ac1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Laravel/ServiceProvider.php
Expand Up @@ -40,7 +40,9 @@ public function register()
public function boot()
{
Validator::extend('msg91_otp', function ($attribute, $value, $parameters, $validator) {
/** @var Client $client */
$client = app(Client::class);
/** @var \Illuminate\Validation\Validator $validator */
$values = $validator->getData();
$number = Arr::get($values, empty($parameters[0]) ? 'phone' : $parameters[0]);
return $client->verify($number, $value);
Expand Down

0 comments on commit f046ac1

Please sign in to comment.