How do I make a Catch-All Route in Laravel

后端 未结 4 1966
悲哀的现实
悲哀的现实 2020-12-05 13:01

I need a laravel routes.php entry that will catch all traffic to a specific domain.com/premium-section of the site so that I can prompt people to become members before acces

4条回答
  •  不知归路
    2020-12-05 14:00

    This works for me

    // The catch-all will match anything except the previous defined routes.
    Route::any('{catchall}', 'CatchAllController@handle')->where('catchall', '.*');
    

提交回复
热议问题