-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathroutes.php
41 lines (37 loc) · 958 Bytes
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
Event::listen('system.route', function () {
/**
* Register CMS routes before all user routes.
*/
/**
* @event cms.beforeRoute
* Fires before cms routes get added
*
* Example usage:
*
* Event::listen('cms.beforeRoute', function () {
* // your code here
* });
*
*/
$result = Event::fire('cms.beforeRoute', [], true);
if ($result === false) {
return;
}
/*
* The CMS module handles all URLs that have not already been handled by the other modules & plugins.
*/
Route::any('{slug?}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?')->middleware('web');
/**
* @event cms.route
* Fires after cms routes get added
*
* Example usage:
*
* Event::listen('cms.route', function () {
* // your code here
* });
*
*/
Event::fire('cms.route');
}, PHP_INT_MIN);