1
|
|
|
<?php namespace Arcanesoft\Foundation\Http\Routes\Admin; |
2
|
|
|
|
3
|
|
|
use Arcanedev\Support\Bases\RouteRegister; |
4
|
|
|
use Illuminate\Contracts\Routing\Registrar; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class SystemRoutes |
8
|
|
|
* |
9
|
|
|
* @package Arcanesoft\Foundation\Http\Routes\Admin |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
*/ |
12
|
|
|
class SystemRoutes extends RouteRegister |
13
|
|
|
{ |
14
|
|
|
/* ------------------------------------------------------------------------------------------------ |
15
|
|
|
| Main Functions |
16
|
|
|
| ------------------------------------------------------------------------------------------------ |
17
|
|
|
*/ |
18
|
|
|
/** |
19
|
|
|
* Map routes. |
20
|
|
|
* |
21
|
|
|
* @param \Illuminate\Contracts\Routing\Registrar $router |
22
|
|
|
*/ |
23
|
12 |
|
public function map(Registrar $router) |
24
|
|
|
{ |
25
|
|
|
$this->group(['prefix' => 'system', 'as' => 'system.', 'namespace' => 'System'], function () { |
26
|
12 |
|
$this->registerSystemInformationRoutes(); |
27
|
12 |
|
$this->registerLogViewerRoutes(); |
28
|
12 |
|
$this->registerRouteViewerRoutes(); |
29
|
12 |
|
}); |
30
|
12 |
|
} |
31
|
|
|
|
32
|
|
|
/* ------------------------------------------------------------------------------------------------ |
33
|
|
|
| Other Functions |
34
|
|
|
| ------------------------------------------------------------------------------------------------ |
35
|
|
|
*/ |
36
|
|
|
/** |
37
|
|
|
* Register the system information routes. |
38
|
|
|
*/ |
39
|
12 |
|
private function registerSystemInformationRoutes() |
40
|
|
|
{ |
41
|
|
|
$this->group(['prefix' => 'information', 'as' => 'information.'], function () { |
42
|
12 |
|
$this->get('/', 'InformationController@index') |
43
|
12 |
|
->name('index'); |
44
|
12 |
|
}); |
45
|
12 |
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Register LogViewer routes. |
49
|
|
|
*/ |
50
|
12 |
|
private function registerLogViewerRoutes() |
51
|
|
|
{ |
52
|
|
|
$this->group(['prefix' => 'log-viewer', 'as' => 'log-viewer.'], function () { |
53
|
12 |
|
$this->get('/', 'LogViewerController@index') |
54
|
12 |
|
->name('index'); // foundation::system.log-viewer.index |
55
|
|
|
|
56
|
|
|
$this->group(['prefix' => 'logs', 'as' => 'logs.'], function() { |
57
|
12 |
|
$this->get('/', 'LogViewerController@listLogs') |
58
|
12 |
|
->name('list'); // foundation::system.log-viewer.logs.list |
59
|
|
|
|
60
|
|
|
$this->group(['prefix' => '{date}'], function() { |
61
|
12 |
|
$this->get('/', 'LogViewerController@show') |
62
|
12 |
|
->name('show'); // foundation::system.log-viewer.logs.show |
63
|
|
|
|
64
|
12 |
|
$this->get('download', 'LogViewerController@download') |
65
|
12 |
|
->name('download'); // foundation::system.log-viewer.logs.download |
66
|
|
|
|
67
|
12 |
|
$this->get('{level}', 'LogViewerController@showByLevel') |
68
|
12 |
|
->name('filter'); // foundation::system.log-viewer.logs.filter |
69
|
12 |
|
}); |
70
|
|
|
|
71
|
12 |
|
$this->delete('delete', 'LogViewerController@delete') |
72
|
12 |
|
->name('delete'); // foundation::system.log-viewer.logs.delete |
73
|
12 |
|
}); |
74
|
12 |
|
}); |
75
|
12 |
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* Register the route viewer routes. |
79
|
|
|
*/ |
80
|
|
|
private function registerRouteViewerRoutes() |
81
|
|
|
{ |
82
|
12 |
|
$this->group(['prefix' => 'routes', 'as' => 'routes.'], function () { |
83
|
12 |
|
$this->get('/', 'RoutesController@index') |
84
|
12 |
|
->name('index'); |
85
|
12 |
|
}); |
86
|
12 |
|
} |
87
|
|
|
} |
88
|
|
|
|