Created
June 23, 2021 19:05
-
-
Save Braunson/47d2b3b5f12e137eb538814d0baf47ae to your computer and use it in GitHub Desktop.
Laravel - Get information about a named route
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
$route = \Route::getRoutes()->getByName('home'); | |
// => Illuminate\Routing\Route { | |
// +uri: "/", | |
// +methods: [ | |
// "GET", | |
// "HEAD", | |
// ], | |
// +action: [ | |
// "middleware" => [ | |
// "web", | |
// ], | |
// "uses" => "App\Http\Controllers\HomeController@homepage", | |
// "controller" => "App\Http\Controllers\HomeController@homepage", | |
// "namespace" => "App\Http\Controllers", | |
// "prefix" => null, | |
// "where" => [], | |
// "as" => "home", | |
// ], | |
// +isFallback: false, | |
// +controller: null, | |
// +defaults: [], | |
// +wheres: [], | |
// +parameters: null, | |
// +parameterNames: null, | |
// +computedMiddleware: null, | |
// +compiled: null, | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment