diff --git a/routing/controller b/routing/controller index e1a8393e..6abc2dd9 100644 --- a/routing/controller +++ b/routing/controller @@ -47,7 +47,28 @@ This single route declaration creates multiple routes to handle a variety of act The generated controller will already have methods stubbed for each of these actions, including notes informing you of the HTTP verbs and URIs they handle. -| Verb | URI | Action| -| ------------- |:-------------:| -----:| +| Verb | URI | Action | +| :-------------: | :-------------: | :-----------: | +| GET | test/index | test.index | +| POST | test/create | test.create | +| GET | test/show | test.show | +| PUT | test/replace | test.replace | +| PATCH | test/destroy | test.destroy | +| DELETE | test/destroy | test.destroy | +| DELETE | test/clear | test.clear | +You can also custom method name, add `makeResource` method in the controller +```swift + func makeResource() -> Resource { + return Resource( + index: index, + store: create, + show: show, + replace: replace, + modify: update, + destroy: delete, + clear: clear + ) + } +```