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.
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 *
You can’t perform that action at this time.
0 commit comments