所以我有一個名為的配置文件,services.php其內(nèi)容如下[ 'facebook' => [ 'url' => 'https://...']]但我想要這樣的:[ 'facebook' => [ 'url' => url(route('socialite-callback', ['provider' => 'facebook']))]]然而tinker,這樣的代碼會報告:Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in /laravel/justitalianwine_ecommerce/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 68但如果我使用第一個喜歡,然后打開tinker并粘貼此:url(route('socialite-callback', ['provider' => 'facebook']))效果很好
如何在配置文件中使用路由助手
幕布斯7119047
2023-07-08 15:48:23