Created
November 10, 2015 09:58
-
-
Save Wolg/313e2958c8a71b64b6be to your computer and use it in GitHub Desktop.
Can be converted to Markdown table here http://www.tablesgenerator.com/markdown_tables
This file contains 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 characters
<?php | |
$routeCollection = Route::getRoutes(); | |
$result = []; | |
foreach($routeCollection as $value) { | |
$result[] = [ | |
'HTTP Method' => $value->getMethods()[0], | |
'Route' => $value->getPath(), | |
'Corresponding Action' => $value->getActionName(), | |
]; | |
} | |
$file = fopen('file.csv', 'w'); | |
foreach ($result as $row) { | |
fputcsv($file, $row); | |
} | |
fclose($file); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment