Files
pterodactyl-panel/app/Providers/RouteServiceProvider.php
T

46 lines
1.1 KiB
PHP
Raw Normal View History

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 your route model bindings, pattern filters, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
2016-09-03 17:09:00 -04:00
public function boot()
2015-12-06 13:58:49 -05:00
{
//
2016-09-03 17:09:00 -04:00
parent::boot();
2015-12-06 13:58:49 -05:00
}
/**
* Define the routes for the application.
*
* @return void
*/
2016-09-03 17:09:00 -04:00
public function map()
2015-12-06 13:58:49 -05:00
{
2016-09-05 16:21:36 -04:00
Route::group(['namespace' => $this->namespace], function ($router) {
2015-12-06 13:58:49 -05:00
foreach (glob(app_path('Http//Routes') . '/*.php') as $file) {
$this->app->make('Pterodactyl\\Http\\Routes\\' . basename($file, '.php'))->map($router);
}
});
}
}