2014-08-20 00:10:30 -05:00
|
|
|
<?php namespace App\Providers;
|
2014-08-11 10:13:20 -05:00
|
|
|
|
2014-09-24 09:49:21 -05:00
|
|
|
use Illuminate\Routing\Router;
|
2014-11-11 20:10:53 -06: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 {
|
|
|
|
|
|
2014-10-20 11:14:41 -05:00
|
|
|
/**
|
|
|
|
|
* All of the application's route middleware keys.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $middleware = [
|
2014-11-11 12:51:55 -06:00
|
|
|
'auth' => 'App\Http\Middleware\Authenticate',
|
|
|
|
|
'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
|
|
|
|
|
'guest' => 'App\Http\Middleware\RedirectIfAuthenticated',
|
2014-10-20 11:14:41 -05:00
|
|
|
];
|
|
|
|
|
|
2014-08-11 10:13:20 -05:00
|
|
|
/**
|
|
|
|
|
* Called before routes are registered.
|
|
|
|
|
*
|
|
|
|
|
* Register any model bindings or pattern based filters.
|
|
|
|
|
*
|
2014-10-15 13:35:10 +01:00
|
|
|
* @param \Illuminate\Routing\Router $router
|
2014-11-11 20:10:53 -06:00
|
|
|
* @param \Illuminate\Contracts\Routing\UrlGenerator $url
|
2014-08-11 10:13:20 -05:00
|
|
|
* @return void
|
|
|
|
|
*/
|
2014-11-11 20:10:53 -06:00
|
|
|
public function before(Router $router, UrlGenerator $url)
|
2014-08-11 10:13:20 -05:00
|
|
|
{
|
2014-11-11 20:10:53 -06:00
|
|
|
$url->setRootControllerNamespace('App\Http\Controllers');
|
2014-08-11 10:13:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the routes for the application.
|
|
|
|
|
*
|
2014-10-15 13:35:10 +01:00
|
|
|
* @param \Illuminate\Routing\Router $router
|
2014-08-11 10:13:20 -05:00
|
|
|
* @return void
|
|
|
|
|
*/
|
2014-10-14 20:07:12 -05:00
|
|
|
public function map(Router $router)
|
2014-08-11 10:13:20 -05:00
|
|
|
{
|
2014-11-02 10:02:20 -06:00
|
|
|
$router->group(['namespace' => 'App\Http\Controllers'], function($router)
|
|
|
|
|
{
|
|
|
|
|
require app_path('Http/routes.php');
|
|
|
|
|
});
|
2014-08-11 10:13:20 -05:00
|
|
|
}
|
|
|
|
|
|
2014-09-15 09:12:48 -03:00
|
|
|
}
|