Handling “XMLHttpRequest” OPTIONS Pre-flight Request in Laravel
Neo Ighodaro

This doesn’t work unless OPTIONS request is routed through the middleware. And if it is, we can spare ourselves the hassle of checking the method in the middleware by doing something like this:

`Route::options(‘/{any}’, function(){ return ‘’; })->where(‘any’, ‘.*’);`

Like what you read? Give Pawel Trauth a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.