Skip to content

Commit 6bb80f7

Browse files
authored
Merge pull request #1024 from kenjis/docs-improve-extending_controllers
docs: add instruction to change route in extending_controllers.md
2 parents ce49903 + da20660 commit 6bb80f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/customization/extending_controllers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Extending the Controllers
22

3+
## Provided Controllers
4+
35
Shield has the following controllers that can be extended to handle
46
various parts of the authentication process:
57

@@ -9,6 +11,8 @@ various parts of the authentication process:
911
- **MagicLinkController** handles the "lost password" process that allows a user to login with a link sent to their email. This allows you to
1012
override the message that is displayed to a user to describe what is happening, if you'd like to provide more information than simply swapping out the view used.
1113

14+
## How to Extend
15+
1216
It is not recommended to copy the entire controller into **app/Controllers** and change its namespace. Instead, you should create a new controller that extends
1317
the existing controller and then only override the methods needed. This allows the other methods to stay up to date with any security
1418
updates that might happen in the controllers.
@@ -29,3 +33,5 @@ class LoginController extends ShieldLogin
2933
}
3034
}
3135
```
36+
37+
After extending, don't forget to change the route. See [Customizing Routes](./route_config.md).

0 commit comments

Comments
 (0)