Skip to content

Commit

Permalink
Merge pull request #9 from BRACKETS-by-TRIAD/feature/custom-template
Browse files Browse the repository at this point in the history
Feature/custom template
  • Loading branch information
miroslavtrnavsky authored Aug 11, 2021
2 parents f4a82cd + 2616fda commit 00640f4
Show file tree
Hide file tree
Showing 5 changed files with 639 additions and 586 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ Then you need to define an action that would require verification.
This can be achieved in the configuration file `/config/verifications.php`.

```php
'enabled' => env('VERIFICATION_ENABLED', true), // you can enable/disable globally (i.e. disabled for tests/dev env)
'enabled' => env('VERIFICATION_ENABLED', true), // you can enable/disable globally (i.e. disabled for tests/dev env)
'actions' => [
'my-action' => [
'enabled' => true, // you can enable/disable single action
'channel' => 'sms', // currently: sms, email
'expires_in' => 15, // specifies how many minutes does it take to require another code verification for the same action
'expires_from' => 'verification', // one of: 'last-activity' or 'verification', specifies what triggers the expiration (see expires_in)
'enabled' => true, // you can enable/disable single action
'channel' => 'sms', // currently: sms, email
'form_template' => 'brackets/verifications::verification', // blade name with namespace used for verification code form
'expires_in' => 15, // specifies how many minutes does it take to require another code verification for the same action
'expires_from' => 'verification', // one of: 'last-activity' or 'verification', specifies what triggers the expiration (see expires_in)
'code' => [
'type' => 'numeric', // specifies the type of verification code, can be one of: 'numeric' or 'string'
'length' => 6, // specifies the verification code length, defaults to 6
'expires_in' => 10, // specifies how many minutes is the code valid
'type' => 'numeric', // specifies the type of verification code, can be one of: 'numeric' or 'string'
'length' => 6, // specifies the verification code length, defaults to 6
'expires_in' => 10, // specifies how many minutes is the code valid
]
]
]
Expand All @@ -65,6 +66,7 @@ Define the action in your config:
'money-balance' => [
'enabled' => true,
'channel' => 'sms',
'form_template' => 'brackets/verifications::verification',
'expires_in' => 15,
'expires_from' => 'verification',
'code' => [
Expand Down Expand Up @@ -252,9 +254,9 @@ The package ships with the one SMS provider - Twilio.
To use Twilio, you just need to provide these variables in your `.env` file:

```.
TWILIO_SID:"INSERT YOUR TWILIO SID HERE"
TWILIO_AUTH_TOKEN:"INSERT YOUR TWILIO TOKEN HERE"
TWILIO_NUMBER:"INSERT YOUR TWILIO NUMBER IN [E.164] FORMAT"
TWILIO_SID="INSERT YOUR TWILIO SID HERE"
TWILIO_AUTH_TOKEN="INSERT YOUR TWILIO TOKEN HERE"
TWILIO_NUMBER="INSERT YOUR TWILIO NUMBER IN [E.164] FORMAT"
```

Check out [this blogpost](https://www.twilio.com/blog/create-sms-portal-laravel-php-twilio) to find out more info about the Twilio integration.
Expand Down
Loading

0 comments on commit 00640f4

Please sign in to comment.