Migrate to Laravel 5.3
This commit is contained in:
parent
579aee7a12
commit
577fae0540
33 changed files with 424 additions and 297 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
|
@ -22,22 +22,23 @@ class RouteServiceProvider extends ServiceProvider
|
|||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function boot(Router $router)
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
|
||||
parent::boot($router);
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
public function map(Router $router)
|
||||
public function map()
|
||||
{
|
||||
$this->mapWebRoutes($router);
|
||||
$this->mapWebRoutes();
|
||||
|
||||
$this->mapApiRoutes();
|
||||
|
||||
//
|
||||
}
|
||||
|
@ -47,15 +48,33 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*
|
||||
* @param \Illuminate\Routing\Router $router
|
||||
* @return void
|
||||
*/
|
||||
protected function mapWebRoutes(Router $router)
|
||||
protected function mapWebRoutes()
|
||||
{
|
||||
$router->group([
|
||||
'namespace' => $this->namespace, 'middleware' => 'web',
|
||||
Route::group([
|
||||
'middleware' => 'web',
|
||||
'namespace' => $this->namespace,
|
||||
], function ($router) {
|
||||
require app_path('Http/routes.php');
|
||||
require base_path('routes/web.php');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::group([
|
||||
'middleware' => 'api',
|
||||
'namespace' => $this->namespace,
|
||||
'prefix' => 'api'
|
||||
], function ($router) {
|
||||
require base_path('routes/api.php');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue