I was trying ti use Dingo package with Lumen. But unfortunately while setting up routes , its showing following error. Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router] error on Lumen
Please let me know if anyone has any solution.
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function($api){
$api->get('users', function(){
return 'test';
});
});
Thanks man:) After 4 years your solution is still useful:) It just needs a little modification.
$app->register(\Dingo\Api\Provider\LumenServiceProvider::class);
in /bootstrap/app.php
It helped me with Lumen 7.0 and DingoApi 3.0.0