Skip to content

Commit 4b635b4

Browse files
committed
Update documentation for 5.2
1 parent 0663d36 commit 4b635b4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ Edit the `app\Http\Controller\Auth\AuthController.php` file.
216216
- Overwrite and customize the view name for the getVerificationError method
217217
(not mandatory)
218218
- Create the verification error view according to the defined path (mandatory)
219+
- Overwrite the contructor (mandatory)
219220
- Overwrite the postRegister method (mandatory)
220221

221222
```
@@ -230,6 +231,24 @@ Edit the `app\Http\Controller\Auth\AuthController.php` file.
230231
231232
...
232233
234+
/**
235+
* Create a new authentication controller instance.
236+
*
237+
* @return void
238+
*/
239+
public function __construct()
240+
{
241+
$this->middleware('auth', ['only' => ['getVerification', 'getVerificationError']]);
242+
243+
// Laravel 5.0.*|5.1.*
244+
$this->middleware('guest', ['except' => ['getLogout', 'getVerification', 'getVerificationError']]);
245+
246+
// Laravel 5.2.*
247+
$this->middleware('guest', ['except' => ['logout', 'getVerification', 'getVerificationError']]);
248+
}
249+
250+
...
251+
233252
/**
234253
* Handle a registration request for the application.
235254
*

0 commit comments

Comments
 (0)