-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
routes.php
44 lines (39 loc) · 1.03 KB
/
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
42
43
44
<?php
Event::listen('system.route', function () {
/**
* Register Backend routes before all user routes.
*/
/**
* @event backend.beforeRoute
* Fires before backend routes get added
*
* Example usage:
*
* Event::listen('backend.beforeRoute', function () {
* // your code here
* });
*
*/
Event::fire('backend.beforeRoute');
/*
* Route everything to `Backend\Classes\BackendController`, which itself acts as a router for the Backend.
*/
Route::group([
'middleware' => ['web'],
'prefix' => Config::get('cms.backendUri', 'backend')
], function () {
Route::any('{slug?}', 'Backend\Classes\BackendController@run')->where('slug', '(.*)?');
});
/**
* @event backend.route
* Fires after backend routes have been added
*
* Example usage:
*
* Event::listen('backend.route', function () {
* // your code here
* });
*
*/
Event::fire('backend.route');
});