2015-12-06 19:58:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
2016-09-03 23:09:00 +02:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2015-12-06 19:58:49 +01:00
|
|
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class RouteServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* This namespace is applied to the controller routes in your routes file.
|
|
|
|
*
|
|
|
|
* In addition, it is set as the URL generator's root namespace.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $namespace = 'Pterodactyl\Http\Controllers';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define your route model bindings, pattern filters, etc.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2016-09-03 23:09:00 +02:00
|
|
|
public function boot()
|
2015-12-06 19:58:49 +01:00
|
|
|
{
|
2016-09-03 23:09:00 +02:00
|
|
|
parent::boot();
|
2015-12-06 19:58:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the routes for the application.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2016-09-03 23:09:00 +02:00
|
|
|
public function map()
|
2015-12-06 19:58:49 +01:00
|
|
|
{
|
2017-04-02 03:01:10 +02:00
|
|
|
Route::middleware(['web', 'auth', 'csrf'])
|
|
|
|
->namespace($this->namespace . '\Base')
|
|
|
|
->group(base_path('routes/base.php'));
|
|
|
|
|
|
|
|
Route::middleware(['web', 'auth', 'admin', 'csrf'])->prefix('/admin')
|
|
|
|
->namespace($this->namespace . '\Admin')
|
|
|
|
->group(base_path('routes/admin.php'));
|
|
|
|
|
|
|
|
Route::middleware(['web', 'guest', 'csrf'])->prefix('/auth')
|
|
|
|
->namespace($this->namespace . '\Auth')
|
|
|
|
->group(base_path('routes/auth.php'));
|
|
|
|
|
|
|
|
Route::middleware(['web', 'auth', 'server', 'csrf'])->prefix('/server/{server}')
|
|
|
|
->namespace($this->namespace . '\Server')
|
|
|
|
->group(base_path('routes/server.php'));
|
|
|
|
|
|
|
|
Route::middleware(['web'])->prefix('/remote')
|
|
|
|
->namespace($this->namespace . '\Remote')
|
|
|
|
->group(base_path('routes/remote.php'));
|
|
|
|
|
|
|
|
Route::middleware(['web', 'daemon'])->prefix('/daemon')
|
|
|
|
->namespace($this->namespace . '\Daemon')
|
|
|
|
->group(base_path('routes/daemon.php'));
|
|
|
|
}
|
2015-12-06 19:58:49 +01:00
|
|
|
}
|