2015-12-13 04:42:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
2015-12-14 13:22:39 +00:00
|
|
|
use Illuminate\Routing\Router;
|
2015-12-13 04:42:28 +00:00
|
|
|
|
|
|
|
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 = 'App\Http\Controllers';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define your route model bindings, pattern filters, etc.
|
|
|
|
*
|
2015-12-14 13:22:39 +00:00
|
|
|
* @param \Illuminate\Routing\Router $router
|
|
|
|
*
|
2015-12-13 04:42:28 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot(Router $router)
|
|
|
|
{
|
|
|
|
parent::boot($router);
|
2015-12-14 16:27:26 +00:00
|
|
|
|
|
|
|
$router->model('playlist', 'App\Models\Playlist');
|
|
|
|
$router->model('user', 'App\Models\User');
|
2015-12-13 04:42:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the routes for the application.
|
|
|
|
*
|
2015-12-14 13:22:39 +00:00
|
|
|
* @param \Illuminate\Routing\Router $router
|
|
|
|
*
|
2015-12-13 04:42:28 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function map(Router $router)
|
|
|
|
{
|
|
|
|
$router->group(['namespace' => $this->namespace], function ($router) {
|
|
|
|
require app_path('Http/routes.php');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|