doushu5805 2017-12-19 13:17
浏览 42
已采纳

注册Dingo路线

I'm bit confused. Where do I register the router? Inside routes/api.php? Or elsewhere?

To avoid complications with your main application routes this package utilizes its own router. As such we must first get an instance of the API router to create our endpoints.

$api = app('Dingo\Api\Routing\Router');

Source: Dingo documentation

  • 写回答

1条回答 默认 最新

  • drdawt9210 2017-12-19 13:23
    关注

    After some elaboration routes/api.php is the right place

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?