File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ Edit the `app\Http\Controller\Auth\AuthController.php` file.
216
216
- Overwrite and customize the view name for the getVerificationError method
217
217
(not mandatory)
218
218
- Create the verification error view according to the defined path (mandatory)
219
+ - Overwrite the contructor (mandatory)
219
220
- Overwrite the postRegister method (mandatory)
220
221
221
222
```
@@ -230,6 +231,24 @@ Edit the `app\Http\Controller\Auth\AuthController.php` file.
230
231
231
232
...
232
233
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
+
233
252
/**
234
253
* Handle a registration request for the application.
235
254
*
You can’t perform that action at this time.
0 commit comments