Skip to content

Commit

Permalink
Merge pull request #5 from vaibhavpandeyvpz/vaibhavpandeyvpz-laravel-…
Browse files Browse the repository at this point in the history
…6-compat

Replace usage of removed helper in Laravel 6.0
  • Loading branch information
androidneha authored Oct 9, 2019
2 parents d8f6143 + dc1a60d commit 30b9960
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Laravel\Msg91;

use Illuminate\Notifications\ChannelManager;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
Expand Down Expand Up @@ -40,7 +41,7 @@ public function boot()
Validator::extend('msg91_otp', function ($attribute, $value, $parameters, $validator) {
$client = app(Client::class);
$values = $validator->getData();
$number = array_get($values, empty($parameters[0]) ? 'number' : $parameters[0]);
$number = Arr::get($values, empty($parameters[0]) ? 'number' : $parameters[0]);
return $client->verify($number, $value);
});
}
Expand Down

0 comments on commit 30b9960

Please sign in to comment.