Laravel 未找到流明类路由
我正在尝试实现中所述的代码 这给了我错误找不到类路由。我的问题是如何在lumen中使用Route:dispatch()?Laravel 未找到流明类路由,laravel,lumen,laravel-passport,Laravel,Lumen,Laravel Passport,我正在尝试实现中所述的代码 这给了我错误找不到类路由。我的问题是如何在lumen中使用Route:dispatch()? 谢谢我找到了这个问题的解决方案。我们可以使用以下代码 $proxy = Request::create( '/oauth/token', 'post', [ 'grant_type'=>$grant_type, 'client_id'=>$client_id,
谢谢我找到了这个问题的解决方案。我们可以使用以下代码
$proxy = Request::create(
'/oauth/token',
'post',
[
'grant_type'=>$grant_type,
'client_id'=>$client_id,
'client_secret'=>$client_secret,
'username'=>$username,
'password'=>$password
]
);
return App::dispatch($proxy);
流明5.4
global $app;
$proxy = Request::create(
'/oauth/token',
'post',
[
'grant_type'=>$grant_type,
'client_id'=>$client_id,
'client_secret'=>$client_secret,
'username'=>$username,
'password'=>$password
]
);
return $app->dispatch($proxy);
Lumen使用了一个完全不同的路由器,这一个:所以通过使用fastRoute我可以解决上面的问题,对吗?如何在上面添加新的头?有什么想法吗
global $app;
$proxy = Request::create(
'/oauth/token',
'post',
[
'grant_type'=>$grant_type,
'client_id'=>$client_id,
'client_secret'=>$client_secret,
'username'=>$username,
'password'=>$password
]
);
return $app->dispatch($proxy);