Comments (2)
you are aware that your constraint requires you to have at least 2 characters? and I expect the reason this doesn't work ik because the default.controller doesn't match the constraint either because there are no \
allowed in the constraint. Hope this helps if still relevant :D
from zend-router.
It is not considered a good practice to use controller
placeholder. Declare explicit routes for each controller.
'application' => [
'type' => Literal::class,
'options' => [
'route' => '/app',
'defaults' => [
'controller' => Controller\AppController::class,
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
'index' => [
'type' => Segment::class,
'options' => [
'route' => '/index[/:action]',
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]+',
],
// defaults inherited
],
],
'foo' => [
'type' => Segment::class,
'options' => [
'route' => '/foo[/:action]',
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]+',
],
'defaults' => [
'controller' => Controller\FooController::class,
],
],
],
],
],
from zend-router.
Related Issues (20)
- Action key always returns index, problematic for RESTful controllers HOT 2
- Disable the repo wiki HOT 2
- Segment optional parameters with childs HOT 1
- Translation issue with Router HOT 1
- Working with different locales fix proposal HOT 1
- Strange behaviour with constraints and segment child routes. HOT 1
- wrong dispatch HOT 1
- filterable routes HOT 7
- Slim 2 redirect is not working HOT 1
- Question on assemble() with TreeRouteStack + method routes HOT 1
- Unicode support in Segment and Regex routes is missing HOT 1
- Empty route type HOT 1
- Combination of MVC+Middleware+Wildcard Route give the error HOT 5
- Wildcard no longer works when route ends on slash HOT 3
- Config option to set TreeRouteStack::baseUri HOT 1
- Advanced Routing HOT 2
- Multilingual site in ZF3 HOT 2
- Slashes in route params are unescaped when passing uri option HOT 1
- Mark Query and Wildcard routes as deprecated HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zend-router.