Laravel API Page Not Found











up vote
-1
down vote

favorite












I'm making a API but when i make a GET call with Postman I got a Page Not Found http://127.0.0.1:8000/v1/user/all.



When I check if the route exist with the command php artisan route:list it exist.



php artisan route:list image



I clear al cache but noting changes. I only get Page Not Found on this route, the order are fine.



this is the UserController@all:



/**
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function all()
{
$users = User::all();
return responder()->success($users)->respond();
}









share|improve this question
























  • What server are you using? Are you sure you started the app on that port? Have you tried accessing the url in the browser?
    – nakov
    Nov 10 at 22:15










  • @nakov I'm using the php artisan server, i cant run it on my browser because OAuth2 token.
    – Jur Dekker
    Nov 10 at 22:19










  • so are you passing a valid token using postman to retrieve that route?
    – nakov
    Nov 10 at 22:20










  • @nakov Yes, when I use the wrong one i get unauthenticated
    – Jur Dekker
    Nov 10 at 22:29










  • Can you please show what are you returning from within your UserController@all method?
    – nakov
    Nov 10 at 22:31















up vote
-1
down vote

favorite












I'm making a API but when i make a GET call with Postman I got a Page Not Found http://127.0.0.1:8000/v1/user/all.



When I check if the route exist with the command php artisan route:list it exist.



php artisan route:list image



I clear al cache but noting changes. I only get Page Not Found on this route, the order are fine.



this is the UserController@all:



/**
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function all()
{
$users = User::all();
return responder()->success($users)->respond();
}









share|improve this question
























  • What server are you using? Are you sure you started the app on that port? Have you tried accessing the url in the browser?
    – nakov
    Nov 10 at 22:15










  • @nakov I'm using the php artisan server, i cant run it on my browser because OAuth2 token.
    – Jur Dekker
    Nov 10 at 22:19










  • so are you passing a valid token using postman to retrieve that route?
    – nakov
    Nov 10 at 22:20










  • @nakov Yes, when I use the wrong one i get unauthenticated
    – Jur Dekker
    Nov 10 at 22:29










  • Can you please show what are you returning from within your UserController@all method?
    – nakov
    Nov 10 at 22:31













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I'm making a API but when i make a GET call with Postman I got a Page Not Found http://127.0.0.1:8000/v1/user/all.



When I check if the route exist with the command php artisan route:list it exist.



php artisan route:list image



I clear al cache but noting changes. I only get Page Not Found on this route, the order are fine.



this is the UserController@all:



/**
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function all()
{
$users = User::all();
return responder()->success($users)->respond();
}









share|improve this question















I'm making a API but when i make a GET call with Postman I got a Page Not Found http://127.0.0.1:8000/v1/user/all.



When I check if the route exist with the command php artisan route:list it exist.



php artisan route:list image



I clear al cache but noting changes. I only get Page Not Found on this route, the order are fine.



this is the UserController@all:



/**
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function all()
{
$users = User::all();
return responder()->success($users)->respond();
}






laravel api






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 22:58

























asked Nov 10 at 22:11









Jur Dekker

13




13












  • What server are you using? Are you sure you started the app on that port? Have you tried accessing the url in the browser?
    – nakov
    Nov 10 at 22:15










  • @nakov I'm using the php artisan server, i cant run it on my browser because OAuth2 token.
    – Jur Dekker
    Nov 10 at 22:19










  • so are you passing a valid token using postman to retrieve that route?
    – nakov
    Nov 10 at 22:20










  • @nakov Yes, when I use the wrong one i get unauthenticated
    – Jur Dekker
    Nov 10 at 22:29










  • Can you please show what are you returning from within your UserController@all method?
    – nakov
    Nov 10 at 22:31


















  • What server are you using? Are you sure you started the app on that port? Have you tried accessing the url in the browser?
    – nakov
    Nov 10 at 22:15










  • @nakov I'm using the php artisan server, i cant run it on my browser because OAuth2 token.
    – Jur Dekker
    Nov 10 at 22:19










  • so are you passing a valid token using postman to retrieve that route?
    – nakov
    Nov 10 at 22:20










  • @nakov Yes, when I use the wrong one i get unauthenticated
    – Jur Dekker
    Nov 10 at 22:29










  • Can you please show what are you returning from within your UserController@all method?
    – nakov
    Nov 10 at 22:31
















What server are you using? Are you sure you started the app on that port? Have you tried accessing the url in the browser?
– nakov
Nov 10 at 22:15




What server are you using? Are you sure you started the app on that port? Have you tried accessing the url in the browser?
– nakov
Nov 10 at 22:15












@nakov I'm using the php artisan server, i cant run it on my browser because OAuth2 token.
– Jur Dekker
Nov 10 at 22:19




@nakov I'm using the php artisan server, i cant run it on my browser because OAuth2 token.
– Jur Dekker
Nov 10 at 22:19












so are you passing a valid token using postman to retrieve that route?
– nakov
Nov 10 at 22:20




so are you passing a valid token using postman to retrieve that route?
– nakov
Nov 10 at 22:20












@nakov Yes, when I use the wrong one i get unauthenticated
– Jur Dekker
Nov 10 at 22:29




@nakov Yes, when I use the wrong one i get unauthenticated
– Jur Dekker
Nov 10 at 22:29












Can you please show what are you returning from within your UserController@all method?
– nakov
Nov 10 at 22:31




Can you please show what are you returning from within your UserController@all method?
– nakov
Nov 10 at 22:31

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243933%2flaravel-api-page-not-found%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243933%2flaravel-api-page-not-found%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Coverage of Google Street View

Full-time equivalent

Surfing