File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Laravel OTP(One-Time Password)
2
- ![ Test Status ] ( https://img.shields.io/github/workflow/status/mohammad- fouladgar/laravel-otp/run-tests?label=tests )
3
- [ ![ Latest Stable Version ] ( http ://poser.pugx.org/fouladgar/laravel-otp/v )] ( https://packagist.org/packages/ fouladgar/laravel-otp)
4
- [ ![ Total Downloads ] ( http ://poser.pugx.org/fouladgar/laravel-otp/downloads )] ( https://packagist.org/packages/ fouladgar/laravel-otp)
5
- [ ![ Code Style Status ] ( https://github.com/mohammad-fouladgar/laravel-otp/actions/workflows/php-cs-fixer.yml/badge.svg?branch=master )] ( https://github.com/mohammad- fouladgar/laravel-otp/actions/workflows/php-cs-fixer.yml )
2
+ [ ![ Latest Version on Packagist ] ( https://img.shields.io/packagist/v/ fouladgar/laravel-otp.svg )] ( https://packagist.org/packages/fouladgar/laravel-otp )
3
+ ![ Test Status ] ( https ://img.shields.io/github/actions/workflow/status/mohammad- fouladgar/laravel-otp/run-tests.yml?label=tests )
4
+ ![ Code Style Status ] ( https ://img.shields.io/github/actions/workflow/status/mohammad- fouladgar/laravel-otp/php-cs-fixer.yml?label=code%20style )
5
+ ![ Total Downloads ] ( https://img.shields.io/packagist/dt/ fouladgar/laravel-otp )
6
6
7
7
## Introduction
8
8
@@ -53,6 +53,10 @@ OTP('+989389599530', 'token_123');
53
53
// or
54
54
OTP()->useProvider('users')
55
55
->validate('+989389599530', 'token_123');
56
+ // or
57
+ OTP()->useProvider('users')
58
+ ->onlyConfirmToken()
59
+ ->validate('+989389599530', 'token_123');
56
60
```
57
61
58
62
## Installation
Original file line number Diff line number Diff line change @@ -213,11 +213,7 @@ public function it_can_only_confirm_token_and_does_not_create_user(): void
213
213
214
214
$ otp ->send (self ::MOBILE , false );
215
215
216
- $ user = $ otp ->onlyConfirmToken ()
217
- ->validate (
218
- self ::MOBILE ,
219
- Cache::get (self ::MOBILE )['token ' ]
220
- );
216
+ $ user = $ otp ->onlyConfirmToken ()->validate (self ::MOBILE , Cache::get (self ::MOBILE )['token ' ]);
221
217
222
218
$ this ->assertInstanceOf (OTPNotifiable::class, $ user );
223
219
You can’t perform that action at this time.
0 commit comments