小编Kau*_*hra的帖子

如何在另一个路由组中添加路由组..Laravel 5

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::group(['middleware' => 'cors'], function(Router $router){

});

Route::group([

  'prefix' => 'api/v1',
  'namespace' => 'Api'

], function () {

    Route::post('/auth/register', [
    'as' => 'auth.register',
    'uses' => 'AuthController@register'
  ]);

  Route::post('/auth/login', [

    'as' => 'auth.login', …
Run Code Online (Sandbox Code Playgroud)

routes laravel-5

5
推荐指数
1
解决办法
7645
查看次数

标签 统计

laravel-5 ×1

routes ×1