i am new into RESTful API in development in Laravel and i just installed Dingo API. When i run the command php artisan route:list
its giving me the list of routes in the project, when i run php artisan api:routes
i am getting this error
I have configured the api.php file probably correctly according to a tutorial i been following and my routes.php file looks like this
$api = app('Dingo\Api\Routing\Router');
Route::get('/', function () {
return view('welcome');
});
$api->version('v1', function($api){
$api->get('hello', function(){
return 'Heloooooooooooooo';
});
});
when i by-passed that api:routes command and went directly into the browser and hit http://localhost:8000/api/hello, the error it gives me is the one with status code 500
{"message":"Route is not bound.",
"status_code":500,
"debug":{"line":8614,"file":"C:\\wamp64\\www\\his-word\\his_word_api\\bootstrap\\cache\\compiled.php","class":"LogicException","trace":["#0 C:\\wamp64\\www\\his- ....}
Thanks guys in advance