0
私はすべてのルート名前リスト、アクションリストとlaravel 5.0コントローラの内部の他のデータにしたいでRouteCollectionを使用する方法、コンポーネントのSymfony コンポーネントルーティング注釈ルートを使用してLaravel5.0
私は、以下の使用してきましたビュー内のコード、それは言葉だけでなくなりますが、私はコントローラで使用される場合、私は私がコントローラーにこの方法を使用する場合
$routes = Route::getRoutes();
dd($routes);
エラーが起こるエラーが発生します。
FatalErrorException in Handler.php line 26:
Uncaught TypeError: Argument 1 passed to App\Exceptions\Handler::report() must be an instance of Exception, instance of Error given,
called in vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php on line 73 and defined in
.../app/Exceptions/Handler.php:26
Stack trace:
#0 /vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(73): App\Exceptions\Handler->report(Object(Error))
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Error))
#2 {main}
thrown
私はあなたのコントローラに以下の行を追加してみてください
にビューの内側に#routes: array:3 [▶]
#allRoutes: array:329 [▶]
#nameList: array:260 [▶]
#actionList: array:325 [▶]