Am I doing anything wrong or missing something?
I am accessing this via : php -S localhost:8000 -t public at localhost:8000/api/hello
with configurations:
API_STANDARDS_TREE=vnd
API_SUBTYPE=core
API_DOMAIN=api.site.com
API_VERSION=v1
API_NAME="Core API"
API_CONDITIONAL_REQUEST=false
API_STRICT=false
API_DEFAULT_FORMAT=json
API_DEBUG=true
routes.php
$api = $app['api.router'];
$api->version('v1',['prefix' => 'api'],function($api){
$api->get('hello',function(){
return "hello";
});
});
bootstrap/app.php
$app->register(Dingo\Api\Provider\LumenServiceProvider::class)
Error:
NotFoundHttpException in RoutesRequests.php line 438:
in RoutesRequests.php line 438
at Application->handleDispatcherResponse(array('0')) in RoutesRequests.php line 377
at Application->Laravel\Lumen\Concerns\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Laravel\Lumen\Routing\{closure}(object(Request)) in Request.php line 95
at Request->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Request), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Laravel\Lumen\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in RoutesRequests.php line 617
at Application->sendThroughPipeline(array('Dingo\Api\Http\Middleware\Request'), object(Closure)) in RoutesRequests.php line 378
at Application->dispatch(null) in RoutesRequests.php line 323
at Application->run() in index.php line 28
@geocine try
$app->register(\Dingo\Api\Provider\LumenServiceProvider::class); with a backslash before Dingo API_DOMAIN=localhost @lucasmichot Many thanks! it was the API_DOMAIN that was causing the issue.
You're welcome!
You save my life today, after looking for 4hours for solution..
i have public IP without domain, in my .env still localhost, after i change to IP, the program run now
many thanks
Thanks.
Most helpful comment
@geocine try
$app->register(\Dingo\Api\Provider\LumenServiceProvider::class);with a backslash beforeDingoAPI_DOMAIN=localhost