Skip to content

Instantly share code, notes, and snippets.

@bobdenotter
Created April 1, 2015 10:00
Show Gist options
  • Save bobdenotter/3fd04ddc51617da76ad1 to your computer and use it in GitHub Desktop.
Save bobdenotter/3fd04ddc51617da76ad1 to your computer and use it in GitHub Desktop.
Method POST in bolt routing?
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