2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
2016-09-03 21:09:00 +00:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2015-12-06 18:58:49 +00: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.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Routing\Router $router
|
|
|
|
* @return void
|
|
|
|
*/
|
2016-09-03 21:09:00 +00:00
|
|
|
public function boot()
|
2015-12-06 18:58:49 +00:00
|
|
|
{
|
|
|
|
//
|
|
|
|
|
2016-09-03 21:09:00 +00:00
|
|
|
parent::boot();
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the routes for the application.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2016-09-03 21:09:00 +00:00
|
|
|
public function map()
|
2015-12-06 18:58:49 +00:00
|
|
|
{
|
2016-09-05 20:21:36 +00:00
|
|
|
Route::group(['namespace' => $this->namespace], function ($router) {
|
2015-12-06 18:58:49 +00:00
|
|
|
foreach (glob(app_path('Http//Routes') . '/*.php') as $file) {
|
|
|
|
$this->app->make('Pterodactyl\\Http\\Routes\\' . basename($file, '.php'))->map($router);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|