19
19
20
20
This plugins allows you to enable two-factor authentication in your Laravel applications.
21
21
22
- ** Only Laravel 5 or greater supported**
22
+ ** Only Laravel 5.1 or greater supported**
23
23
24
24
25
25
<a name =" installation " ></a >
@@ -34,19 +34,13 @@ composer require srmklive/authy
34
34
* Add the service provider to your $providers array in config/app.php file like:
35
35
36
36
``` php
37
- 'Srmklive\Authy\Providers\AuthyServiceProvider' // Laravel 5
38
- ```
39
- ``` php
40
- Srmklive\Authy\Providers\AuthyServiceProvider::class // Laravel 5.1 or greater
37
+ Srmklive\Authy\Providers\AuthyServiceProvider::class
41
38
```
42
39
43
40
* Add the alias to your $aliases array in config/app.php file like:
44
41
45
42
``` php
46
- 'Authy' => 'Srmklive\Authy\Facades\Authy' // Laravel 5
47
- ```
48
- ``` php
49
- 'Authy' => Srmklive\Authy\Facades\Authy::class // Laravel 5.1 or greater
43
+ 'Authy' => Srmklive\Authy\Facades\Authy::class
50
44
```
51
45
52
46
* Run the following command to publish configuration:
@@ -142,7 +136,7 @@ protected $hidden = [
142
136
// Uncomment this line for Laravel 5.2+
143
137
//auth($this->getGuard())->logout();
144
138
145
- // Uncomment this line for Laravel 5.0 & 5. 1
139
+ // Uncomment this line for Laravel 5.1
146
140
// auth()->logout();
147
141
148
142
$request->session()->put('authy:auth:id', $user->id);
@@ -178,7 +172,7 @@ protected $hidden = [
178
172
//$provider = config('auth.guards.' . $guard . '.provider');
179
173
//$model = config('auth.providers.' . $provider . '.model');
180
174
181
- // Uncomment the line below for use in Laravel 5.0 & 5. 1
175
+ // Uncomment the line below for use in Laravel 5.1
182
176
// $model = config('auth.model');
183
177
184
178
$user = (new $model)->findOrFail(
@@ -189,8 +183,8 @@ protected $hidden = [
189
183
// Uncomment this line for Laravel 5.2+
190
184
//auth($this->getGuard())->login($user);
191
185
192
- // Uncomment this line for Laravel 5.0 & 5. 1
193
- //auth()->login($user);
186
+ // Uncomment this line for Laravel 5.1
187
+ //auth()->login($user);
194
188
195
189
return redirect()->intended($this->redirectPath());
196
190
} else {
0 commit comments