Created
November 14, 2018 02:50
-
-
Save aalipar13/cdb6cf5b4c33a7c96de055a375e589a4 to your computer and use it in GitHub Desktop.
Revisions
-
aalipar13 created this gist
Nov 14, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ /** * Generate a CSV of all the routes */ Route::get('r', function() { header('Content-Type: application/excel'); header('Content-Disposition: attachment; filename="routes.csv"'); $routes = Route::getRoutes(); $fp = fopen('php://output', 'w'); fputcsv($fp, ['METHOD', 'URI', 'NAME', 'ACTION']); foreach ($routes as $route) { fputcsv($fp, [head($route->methods()) , $route->uri(), $route->getName(), $route->getActionName()]); } fclose($fp); });