Api: BindingResolutionException Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router].

Created on 2 Aug 2017  路  2Comments  路  Source: dingo/api

I'm using Lumen 5.4 with the latest Dingo.

I have followed the installation procedure and also registered the class to bootstrap/app.php

$app->register(Dingo\Api\Provider\LumenServiceProvider::class);

But when i set route below it returns error

BindingResolutionException Target [DingoApi\ContractRoutingAdapter] is not instantiable while building [DingoApiRoutingRouter].

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

$api->version('v1', function ($api) {

    $api->get('test', function () {
        return 'It is ok';
    });

});

Thanks.

lumen

Most helpful comment

Same issue for me in Laravel 5.4

All 2 comments

Same issue for me in Laravel 5.4

Same issue in Lumen 5.8 and DingoApi-2.0.0-beta1, how to solve it? Thank you!

Was this page helpful?
0 / 5 - 0 ratings