1 | <?php namespace Arcanesoft\Foundation\Http\Routes\Admin; |
||
11 | class SystemRoutes extends RouteRegistrar |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Main Functions |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * Map routes. |
||
19 | */ |
||
20 | 21 | public function map() |
|
21 | { |
||
22 | $this->namespace('System')->prefix('system')->name('system.')->group(function () { |
||
23 | 21 | $this->registerSystemInformationRoutes(); |
|
24 | 21 | $this->registerLogViewerRoutes(); |
|
25 | 21 | $this->registerRouteViewerRoutes(); |
|
26 | 21 | $this->registerBackupsRoutes(); |
|
27 | 21 | }); |
|
28 | 21 | } |
|
29 | |||
30 | /* ------------------------------------------------------------------------------------------------ |
||
31 | | Other Functions |
||
32 | | ------------------------------------------------------------------------------------------------ |
||
33 | */ |
||
34 | /** |
||
35 | * Register the system information routes. |
||
36 | */ |
||
37 | 21 | private function registerSystemInformationRoutes() |
|
38 | { |
||
39 | $this->prefix('information')->name('information.')->group(function () { |
||
40 | 21 | $this->get('/', 'InformationController@index') |
|
41 | 21 | ->name('index'); // admin::foundation.system.information.index |
|
42 | 21 | }); |
|
43 | 21 | } |
|
44 | |||
45 | /** |
||
46 | * Register LogViewer routes. |
||
47 | */ |
||
48 | 21 | private function registerLogViewerRoutes() |
|
49 | { |
||
50 | $this->prefix('log-viewer')->name('log-viewer.')->group(function () { |
||
51 | 21 | $this->get('/', 'LogViewerController@index') |
|
52 | 21 | ->name('index'); // admin::foundation.system.log-viewer.index |
|
53 | |||
54 | $this->prefix('logs')->name('logs.')->group(function() { |
||
55 | 21 | $this->get('/', 'LogViewerController@listLogs') |
|
56 | 21 | ->name('list'); // admin::foundation.system.log-viewer.logs.list |
|
57 | |||
58 | 21 | $this->get('{date}', 'LogViewerController@show') |
|
59 | 21 | ->name('show'); // admin::foundation.system.log-viewer.logs.show |
|
60 | |||
61 | 21 | $this->get('{date}/download', 'LogViewerController@download') |
|
62 | 21 | ->name('download'); // admin::foundation.system.log-viewer.logs.download |
|
63 | |||
64 | 21 | $this->get('{date}/{level}', 'LogViewerController@showByLevel') |
|
65 | 21 | ->name('filter'); // admin::foundation.system.log-viewer.logs.filter |
|
66 | |||
67 | 21 | $this->delete('delete', 'LogViewerController@delete') |
|
68 | 21 | ->name('delete'); // admin::foundation.system.log-viewer.logs.delete |
|
69 | 21 | }); |
|
70 | 21 | }); |
|
71 | 21 | } |
|
72 | |||
73 | /** |
||
74 | * Register the route viewer routes. |
||
75 | */ |
||
76 | 21 | private function registerRouteViewerRoutes() |
|
83 | |||
84 | /** |
||
85 | * Register the backups routes. |
||
86 | */ |
||
87 | private function registerBackupsRoutes() |
||
103 | } |
||
104 |