Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我使用以下内容:
Artisan::call('routes')
它返回 0。
我希望解析php artisan routes从 CLI 运行时出现的相同路由。
php artisan routes
有没有人成功地尝试过这个?
您不需要工匠 - 只需使用路线类本身:
<table> <tr> <th>Routes</th> </tr> @foreach(Route::getRoutes() as $name => $route) <tr> <td>{{ $name }}</td> </tr> @endforeach </table>