-
Laravel
Route::get('{path}', function (\Illuminate\Http\Request $request) { //拿到路由,查資料庫/快取,想怎麼渲染就怎渲染 return $request->getPathInfo(); })->where('path', '.*');
-
Lumen
$router->get('{path:.*}', function (\Illuminate\Http\Request $request) { return $request->getPathInfo(); });
本作品採用《CC 協議》,轉載必須註明作者和本文連結