Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar
Level 27

api routes

Hello,

I would like to check:

routes/api.php

Route::get('reports/documents', 'ReportsAPIController@documents');   

Route::resource('customer_groups', 'CustomerGroupAPIController');

How to know if my api works or not using these routes. Is it enough to type: www.mainurl.com/reports/documents and www.mainurl.com/customer_groups

?

0 likes
1 reply
siangboon's avatar

under api.php route list, a "/api" prefix is default "http://www.site.com/api/reports/documents"

i see you have quite a lot of questions, and I think you should at least tried it out yourself first and ask when you have real error or problem, some of the questions just need a simple test will do, you can get your answer by your own, and more faster than waiting people reply, it save your time and save others' time as well. It's ok to ask a lot of questions but it's not ok to ask before you tried your own, don't abuse it, please putting your own efforts first, especially there lot of people encountering real issue and waiting for helps.

Please or to participate in this conversation.