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();
}
laravel api
|
show 2 more comments
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();
}
laravel api
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 thephp 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 getunauthenticated
– Jur Dekker
Nov 10 at 22:29
Can you please show what are you returning from within yourUserController@allmethod?
– nakov
Nov 10 at 22:31
|
show 2 more comments
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();
}
laravel api
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
laravel api
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 thephp 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 getunauthenticated
– Jur Dekker
Nov 10 at 22:29
Can you please show what are you returning from within yourUserController@allmethod?
– nakov
Nov 10 at 22:31
|
show 2 more comments
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 thephp 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 getunauthenticated
– Jur Dekker
Nov 10 at 22:29
Can you please show what are you returning from within yourUserController@allmethod?
– 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
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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@allmethod?– nakov
Nov 10 at 22:31