Get config in Routes?
问题 I want to prefix all my routes with a value from config but I am having trouble getting the value from the config file: Config::get('custom.routes.prefix'); The above gets null even though the value is set in the config file: //config/custom.php 'routes' => => [ 'prefix' => 'whatever', ], How can I get access to config in routes.php? Edit Please note this is not how a question about how to prefix routes, it's how to prefix them with a value from config. 回答1: Maybe just store the route name in