In my Laravel project I am storing data about events and return them to a website,this website is the event's website where place reservations can be made. Every event has it's own website.I get the event's data and save the reservation details using ajax GET and POST which works just fine, but I would like to protect these routes and I do not know how to do that.
I have read a bit about Laravel Passport but the thing is these event websites do not require registration, a would be participant only needs to fill out a form and reserve the place for himself and Passport with it's token logic could only help me if there were authenticated users involved if I understood the documentation correct.
These are the api routes: Route::get('event/{id}', 'ApiRoutesController@show'); Route::post('reserve', 'ApiRoutesController@reserve');
I would like to prevent people (if they get to know my post method logic) from spamming my database with invalid place reservations by somehow protecting those routes,is that possible without Laravel Passport?
POST
to a login route, for example?) Passport handles the OAuth logic around API requests, but it's up to you where to use it. That all being said, what exactly does "spamming with invalid registrations" mean? What makes it invalid? How would they be spamming it? Etc etc. - Tim Lewis