阅读背景:

PHP Laravel 路由(接口)重定向_卡尔特斯_laravel 路由重定向

来源:互联网 
  • 路由接口重定向,相当于通过 路由2 访问 路由1

    // 路由1
    Route::get('req', function () {
        return 'Get 请求';
    })->name('index.req');
    
    // 路由2
    Route::get('login', function () {
        // 方式一:
        // return redirect(route('index.req'));
        // 方式二:
        return redirect()->route('index.req');
    });
    // 路由1
    Ro



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: