Can you clarify what you are asking a bit further? The term API in the context of Laravel refers to a REST program interface & not a web interface. However essentially any collection of programatic syntax that you create to handle some type of functional connectivity could be considered a API, so technically you could say that even the web routes are an API.
To understand what you are trying to workout, can you elaborate further?
@CamKem So for example I'm asked can you give me an API for getUsers(). In my mind I'm thinking that means a route Route::get('/users', [ UserController::class, 'getUsers') and then maybe a UserController with that function. But I'm not 100% sure if what I'm thinking is correct.
@stormy478 I would try and stick to a RESTful naming conventions of your method, if getUsers() is to display a list of the users, then generally this would use a method name of index().
So for a web route & controller method it would be like this:
@stormy478 Yes, you seem to be on the right path. In the context you are talking: API - is a RESTful resource, for getting, posting, updating & destroying data, so other programs can obtain access to your data.