I need to catch all routes, except those that have /api/ segment in them. I know how to catch every single route
Route::any(\'{all}\', \'AngularController@serveF
Just place route(s) with /api/
segment before this one and it will work as you want. All API related URLs will be processes by first route, everything else will be processed with second one.
You can catch all routes where the path does not start with api
Route::any('{all}', 'AngularController@serveFrontend')->where('all', '^(?!api).*$');
Or simply leave your catchall as the last route and it'll work as expected.