Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello guys before few days i was working on laravel project and that time my laravel version was 5.7.36 and i maked api in 5.7.36 but now i have updated my project and now my laravel version is 5.8.36 but api is not working in it in 5.7 my all api is working perfectly please see my code and tell me what i need to do for this issue


here is the error that i am getting





<title>404 Not Found



Not Found


The requested URL was not found on this server.


Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.






Thanks.

What I have tried:

here is my api.php code:
get('/user', function (Request $request) {

return $request->user();
});
// routes/api.php
// POST /api/post?api_token=UNIQUE_TOKEN
Route::post('post', 'Api\PostController@store')->middleware('auth:api');

Route::get('/get/{business_id}','GetController@databybusinessid');

here is my model code:

get();
return response()->json($users);
}
}
Posted
Updated 3-Nov-20 0:56am
v2
Comments
phil.o 2-Mar-20 6:19am    
You need to tell us the exact error message first.
Member 9983063 2-Mar-20 6:27am    
in postman i am getting 404 error
Member 9983063 2-Mar-20 6:27am    
please help me now am using laravel 5.8
Member 9983063 2-Mar-20 6:34am    
here is the exact error




<title>404 Not Found



Not Found


The requested URL was not found on this server.
Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.
phil.o 2-Mar-20 6:38am    
You should have used the green Improve question widget instead, so that everyone can pay attention to this information in the question itself.
How do I improve my question?

1 solution

Go back to version 5.7.36, which was working and since you gave no reason for upgrading in the first place. One has choices.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900