-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the index_ prefix as an alternative to get_ prefixes
Consider the following endpoints we’d want to create: ```http GET /conversations/123/participants GET /conversations/123/participants/1 ``` Previously we would be unable to create these routes because they would both have to be called `get_participants`. This change allows you to also prefix GET methods with `index_`. The prefix works the same way as `get_` but is a lower priority. They are differentiated by different parameter counts. The above example can be done with the following methods: ```php public function index_participants($id) { } public function get_participants($id, $userID) { } ```
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters