winter/modules/system/routes.php
Marc Jauvin 9a6f71e0d4
Fix route order with new system.beforeRoute and system.route events (#465)
With the recent change to module routes being registered in their boot methods the Backend & CMS modules were registering their routes before the System module could. 

Due to the greedy nature of the CMS module's route it must always be registered last.
2022-02-21 12:28:09 -06:00

43 lines
769 B
PHP

<?php
/**
* Register System routes before all user routes.
*/
/**
* @event system.beforeRoute
* Fires before system routes get added
*
* Example usage:
*
* Event::listen('system.beforeRoute', function () {
* // your code here
* });
*
*/
Event::fire('system.beforeRoute');
/*
* Combine JavaScript and StyleSheet assets
*/
Route::any('combine/{file}', 'System\Classes\SystemController@combine');
/*
* Resize image assets
*/
Route::get('resizer/{identifier}/{encodedUrl}', 'System\Classes\SystemController@resizer');
/**
* @event system.route
* Fires after system routes get added
*
* Example usage:
*
* Event::listen('system.route', function () {
* // your code here
* });
*
*/
Event::fire('system.route');