ivan1986 / subroute
Allows child routers
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- symfony/framework-bundle: >=2.1.0
Requires (Dev)
This package is not auto-updated.
Last update: 2025-02-01 15:35:51 UTC
README
Extension for multiple rourets
install default by composer:
"ivan1986/subroute": "*",
Initialize the bundle:
new Ivan1986\SubrouteBundle\SubrouteBundle(),
What It Do
Allows many routing files called for controllers For example, we have::
/{user}/albums/{album}/list
/{user}/albums/{album}/add
/{user}/albums/{album}/delete/{id}
/{user}/albums/{album}/edit/{id}
/{user}/albums/{album}/show/{id}
A problem::
/{user}/albums/{album}/
one for all this urls, and logic one for all urls.
Solution::
Routing(/{user}/albums/{album}/{slug})
run Controller
continue Routing slug whis $this->get('subrouter')->route('album', 'slug');
run other Controller