Add hooks to the cms/backend route definitions

This commit is contained in:
Samuel Georges 2015-05-02 13:53:05 +10:00
parent e6e0facaa0
commit 366cdd55a8
2 changed files with 20 additions and 0 deletions

View File

@ -4,6 +4,11 @@
* Register Backend routes before all user routes.
*/
App::before(function ($request) {
/*
* Extensibility
*/
Event::fire('backend.beforeRoute');
/*
* Other pages
*/
@ -15,4 +20,9 @@ App::before(function ($request) {
* Entry point
*/
Route::any(Config::get('cms.backendUri', 'backend'), 'Backend\Classes\BackendController@run');
/*
* Extensibility
*/
Event::fire('backend.route');
});

View File

@ -4,9 +4,19 @@
* Register CMS routes before all user routes.
*/
App::before(function ($request) {
/*
* Extensibility
*/
Event::fire('cms.beforeRoute');
/*
* The CMS module intercepts all URLs that were not
* handled by the back-end modules.
*/
Route::any('{slug}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?');
/*
* Extensibility
*/
Event::fire('cms.route');
});