流明级路线未找到 [英] Lumen Class Route Not found

查看:84
本文介绍了流明级路线未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现 Laracast .

$proxy = Request::create(
        '/oauth/token',
        'POST'
    );

    return Route::dispatch($proxy);

这给我错误找不到类路由.我的问题是如何在流明中使用Route:dispatch()? 谢谢

This gives me error Class Route Not found.My question is how can we use Route:dispatch() in lumen ? Thanks

推荐答案

我找到了解决此问题的方法.我们可以使用以下代码.

I found the solution for this problem.We can use the following code.

$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);

这篇关于流明级路线未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆