Files
nl-admin-api/app/Providers/RouteServiceProvider.php

43 lines
1.0 KiB
PHP
Raw Normal View History

2014-08-20 00:10:30 -05:00
<?php namespace App\Providers;
2014-08-11 10:13:20 -05:00
use Illuminate\Routing\Router;
2014-09-18 19:35:08 -05:00
use Illuminate\Contracts\Routing\UrlGenerator;
2014-09-30 21:13:58 -05:00
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
2014-08-11 10:13:20 -05:00
class RouteServiceProvider extends ServiceProvider {
/**
* Called before routes are registered.
*
* Register any model bindings or pattern based filters.
*
2014-09-24 09:58:12 -05:00
* @param Router $router
2014-09-18 19:35:08 -05:00
* @param UrlGenerator $url
2014-08-11 10:13:20 -05:00
* @return void
*/
2014-09-24 09:58:12 -05:00
public function before(Router $router, UrlGenerator $url)
2014-08-11 10:13:20 -05:00
{
2014-09-27 20:35:07 -05:00
$url->setRootControllerNamespace('App\Http\Controllers');
2014-08-11 10:13:20 -05:00
}
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
2014-09-27 20:35:07 -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-09-18 19:35:08 -05:00
$this->app->booted(function()
2014-08-12 16:21:45 -05:00
{
2014-09-27 20:35:07 -05:00
$this->namespaced('App\Http\Controllers', function(Router $router)
2014-08-20 00:10:30 -05:00
{
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
}
}