2014-08-20 00:10:30 -05:00
|
|
|
<?php namespace App\Providers;
|
2014-08-11 10:13:20 -05:00
|
|
|
|
2014-08-29 04:54:40 +02:00
|
|
|
use App, URL;
|
2014-08-11 10:13:20 -05:00
|
|
|
use Illuminate\Routing\RouteServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
|
|
class RouteServiceProvider extends ServiceProvider {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called before routes are registered.
|
|
|
|
|
*
|
|
|
|
|
* Register any model bindings or pattern based filters.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function before()
|
|
|
|
|
{
|
2014-08-29 04:18:29 +02:00
|
|
|
URL::setRootControllerNamespace(
|
|
|
|
|
trim(config('namespaces.controller'), '\\')
|
|
|
|
|
);
|
2014-08-11 10:13:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the routes for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function map()
|
|
|
|
|
{
|
2014-08-27 22:05:56 +02:00
|
|
|
App::booted(function()
|
2014-08-12 16:21:45 -05:00
|
|
|
{
|
2014-08-20 12:48:58 -05:00
|
|
|
// Once the application has booted, we will include the default routes
|
|
|
|
|
// file. This "namespace" helper will load the routes file within a
|
|
|
|
|
// route group which automatically sets the controller namespace.
|
|
|
|
|
|
2014-08-20 00:10:30 -05:00
|
|
|
$this->namespaced(function()
|
|
|
|
|
{
|
2014-08-20 17:04:09 -05:00
|
|
|
require app_path().'/Http/routes.php';
|
2014-08-20 00:10:30 -05:00
|
|
|
});
|
2014-08-12 16:21:45 -05:00
|
|
|
});
|
2014-08-11 10:13:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|