2015-12-06 13:58:49 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
2016-09-03 17:09:00 -04:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2015-12-06 13:58:49 -05: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 the routes for the application.
|
|
|
|
*/
|
2016-09-03 17:09:00 -04:00
|
|
|
public function map()
|
2015-12-06 13:58:49 -05:00
|
|
|
{
|
2017-04-01 21:01:10 -04:00
|
|
|
Route::middleware(['web', 'auth', 'csrf'])
|
2019-03-23 17:41:43 -07:00
|
|
|
->namespace($this->namespace . '\Base')
|
|
|
|
->group(base_path('routes/base.php'));
|
2017-04-01 21:01:10 -04:00
|
|
|
|
|
|
|
Route::middleware(['web', 'auth', 'admin', 'csrf'])->prefix('/admin')
|
2019-03-23 17:41:43 -07:00
|
|
|
->namespace($this->namespace . '\Admin')
|
|
|
|
->group(base_path('routes/admin.php'));
|
2017-04-01 21:01:10 -04:00
|
|
|
|
2017-04-01 21:18:56 -04:00
|
|
|
Route::middleware(['web', 'csrf'])->prefix('/auth')
|
2019-03-23 17:41:43 -07:00
|
|
|
->namespace($this->namespace . '\Auth')
|
|
|
|
->group(base_path('routes/auth.php'));
|
2017-04-01 21:01:10 -04:00
|
|
|
|
2018-08-06 23:14:13 -07:00
|
|
|
Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth', 'node.maintenance'])
|
|
|
|
->prefix('/api/server/{server}')
|
|
|
|
->namespace($this->namespace . '\Server')
|
|
|
|
->group(base_path('routes/server.php'));
|
2017-04-01 21:01:10 -04:00
|
|
|
|
2018-01-19 19:58:57 -06:00
|
|
|
Route::middleware(['api'])->prefix('/api/application')
|
|
|
|
->namespace($this->namespace . '\Api\Application')
|
|
|
|
->group(base_path('routes/api-application.php'));
|
2017-11-19 14:05:13 -06:00
|
|
|
|
2018-02-25 15:30:56 -06:00
|
|
|
Route::middleware(['client-api'])->prefix('/api/client')
|
|
|
|
->namespace($this->namespace . '\Api\Client')
|
|
|
|
->group(base_path('routes/api-client.php'));
|
|
|
|
|
2017-09-23 20:45:25 -05:00
|
|
|
Route::middleware(['daemon'])->prefix('/api/remote')
|
2018-01-19 19:58:57 -06:00
|
|
|
->namespace($this->namespace . '\Api\Remote')
|
2017-09-23 20:45:25 -05:00
|
|
|
->group(base_path('routes/api-remote.php'));
|
2017-04-01 21:01:10 -04:00
|
|
|
}
|
2015-12-06 13:58:49 -05:00
|
|
|
}
|