Laravel: Catch all routes that does not have /api/ segment

后端 未结 2 1866
遇见更好的自我
遇见更好的自我 2021-02-19 21:35

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         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-02-19 22:07

    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.

提交回复
热议问题