I have installed Dingo api version of
"dingo/api": "2.0.0-alpha1"
Installed successful but after execute the following artisan command
php artisan vendor:publish --provider="Dingo\Api\Provider\LaravelServiceProvider"
but it's not generate the api.php file in config folder. after that I'm going to define route file as following
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function ($api) {
$api->group(['middleware' => ['api']], function($api) {
$api->get('test', 'App\Api\Controllers\APIController@test');
});
});
Once I hit the url http://localhost/restful_api/api/test it's return exception
(1/1) BindingResolutionException
Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router].
Please help me for the same. I have follow step byhttps://github.com/dingo
Thank you
Open config/app.php and register the required service provider above your application providers.
Dingo\Api\Provider\LaravelServiceProvider::class
I have added in config/app.php file but not generation api.php file inside the config/ folder
run
Application cache cleared!
Compiled views cleared!
Route cache cleared!
Configuration cache cleared!
Configuration cached successfully!
Generating autoload files
Commands
Most helpful comment
Open config/app.php and register the required service provider above your application providers.
Dingo\Api\Provider\LaravelServiceProvider::class