Created
April 1, 2015 10:00
-
-
Save bobdenotter/3fd04ddc51617da76ad1 to your computer and use it in GitHub Desktop.
Method POST in bolt routing?
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
in routing.yml, add a route with a method: | |
``` | |
fietsnieuws: | |
path: /fietsnieuws | |
method: post | |
defaults: | |
_controller: 'Bolt\Controllers\Frontend::listing' | |
contenttypeslug: 'nieuws' | |
``` | |
Then, add src/Controllers/Routing.php, around line 138, insert this, before the final `->bind()` | |
``` | |
if ($method = $config['method']) { | |
$route->setMethods($method); | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment