Closed imacrayon closed 4 years ago
@imacrayon do you mean something like this?
api/events?after=2019-11-11 00:00:00&before=2019-10-18 00:00:0
also should the endpoint be versioned?
also should the event come from the local db or an external source
@lacasera yes, that example URL looks correct. The JSON info would come from the local database. The code will probably be similar to the index
method in the existing EventController except that it should return a JSON response instead of an Inertia view
pr to fix #28
The endpoint URL can be something simple like
/api/events
. You should be able to filter by the same query string filters available on the homepage.The controller for this endpoint can go here:
app/Http/Controllers/Api/EventController.php