1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Pterodactyl\Providers; |
4
|
|
|
|
5
|
|
|
use Illuminate\Support\Facades\Route; |
6
|
|
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
7
|
|
|
|
8
|
|
|
class RouteServiceProvider extends ServiceProvider |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* This namespace is applied to the controller routes in your routes file. |
12
|
|
|
* |
13
|
|
|
* In addition, it is set as the URL generator's root namespace. |
14
|
|
|
* |
15
|
|
|
* @var string |
16
|
|
|
*/ |
17
|
|
|
protected $namespace = 'Pterodactyl\Http\Controllers'; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Define your route model bindings, pattern filters, etc. |
21
|
|
|
* |
22
|
|
|
* @return void |
23
|
|
|
*/ |
24
|
|
|
public function boot() |
25
|
|
|
{ |
26
|
|
|
parent::boot(); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Define the routes for the application. |
31
|
|
|
* |
32
|
|
|
* @return void |
33
|
|
|
*/ |
34
|
|
|
public function map() |
35
|
|
|
{ |
36
|
|
|
Route::middleware(['web', 'auth', 'csrf']) |
37
|
|
|
->namespace($this->namespace . '\Base') |
38
|
|
|
->group(base_path('routes/base.php')); |
39
|
|
|
|
40
|
|
|
Route::middleware(['web', 'auth', 'admin', 'csrf'])->prefix('/admin') |
41
|
|
|
->namespace($this->namespace . '\Admin') |
42
|
|
|
->group(base_path('routes/admin.php')); |
43
|
|
|
|
44
|
|
|
Route::middleware(['web', 'guest', 'csrf'])->prefix('/auth') |
45
|
|
|
->namespace($this->namespace . '\Auth') |
46
|
|
|
->group(base_path('routes/auth.php')); |
47
|
|
|
|
48
|
|
|
Route::middleware(['web', 'auth', 'server', 'csrf'])->prefix('/server/{server}') |
49
|
|
|
->namespace($this->namespace . '\Server') |
50
|
|
|
->group(base_path('routes/server.php')); |
51
|
|
|
|
52
|
|
|
Route::middleware(['web'])->prefix('/remote') |
53
|
|
|
->namespace($this->namespace . '\Remote') |
54
|
|
|
->group(base_path('routes/remote.php')); |
55
|
|
|
|
56
|
|
|
Route::middleware(['web', 'daemon'])->prefix('/daemon') |
57
|
|
|
->namespace($this->namespace . '\Daemon') |
58
|
|
|
->group(base_path('routes/daemon.php')); |
59
|
|
|
} |
60
|
|
|
} |
61
|
|
|
|