Skip to content

Commit 8c2d173

Browse files
author
foladgar
committed
update readme
1 parent fd96925 commit 8c2d173

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# 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)
66

77
## Introduction
88

@@ -53,6 +53,10 @@ OTP('+989389599530', 'token_123');
5353
// or
5454
OTP()->useProvider('users')
5555
->validate('+989389599530', 'token_123');
56+
// or
57+
OTP()->useProvider('users')
58+
->onlyConfirmToken()
59+
->validate('+989389599530', 'token_123');
5660
```
5761

5862
## Installation

tests/OTPBrokerTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,7 @@ public function it_can_only_confirm_token_and_does_not_create_user(): void
213213

214214
$otp->send(self::MOBILE, false);
215215

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']);
221217

222218
$this->assertInstanceOf(OTPNotifiable::class, $user);
223219

0 commit comments

Comments
 (0)