title: Laravel (6.0) Route not found error - but route exists in route:list
body: <p>I am trying to access a route from a package but I get route not found - even though the route shows when I am using the command php artisan route:list. I have tried clearing all cache but still no success? Everything works fine in my local environment so I am leaning towards a cache issue.</p>
  <p>Error message is below:</p>
  <blockquote>
  <p>[previous exception] [object] (Symfony\Component\Routing\Exception\RouteNotFoundException(code: 0): Route [admin.affiliate_urls.index] not defined. at /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:437)
  [stacktrace]
  #0 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(777): Illuminate\Routing\UrlGenerator-&gt;route()
  #1 /home/forge/site/storage/framework/views/aed68191b7fd34274389d9db4a4a419e12790000.php(145): route()
  #2 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(43): include('/home/forge/www...')
  #3 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine-&gt;evaluatePath()
  #4 /home/forge/site/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(36): Illuminate\View\Engines\CompilerEngine-&gt;get()
  #5 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/View.php(143): Facade\Ignition\Views\Engines\CompilerEngine-&gt;get()
  #6 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/View.php(126): Illuminate\View\View-&gt;getContents()
  #7 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\View\View-&gt;renderContents()
  #8 /home/forge/site/storage/framework/views/a6b35713f60cfc6d83afb428a6584b18d94c1e22.php(10): Illuminate\View\View-&gt;render()
  #9 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(43): include('/home/forge/www...')
  #10 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine-&gt;evaluatePath()
  #11 /home/forge/site/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(36): Illuminate\View\Engines\CompilerEngine-&gt;get()
  #12 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/View.php(143): Facade\Ignition\Views\Engines\CompilerEngine-&gt;get()
  #13 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/View.php(126): Illuminate\View\View-&gt;getContents()
  #14 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\View\View-&gt;renderContents()
  #15 /home/forge/site/vendor/laravel/framework/src/Illuminate/Http/Response.php(42): Illuminate\View\View-&gt;render()
  #16 /home/forge/site/vendor/symfony/http-foundation/Response.php(205): Illuminate\Http\Response-&gt;setContent()
  #17 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(749): Symfony\Component\HttpFoundation\Response-&gt;__construct()
  #18 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Router::toResponse()
  #19 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\Routing\Router-&gt;prepareResponse()
  #20 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Routing\Router-&gt;Illuminate\Routing\{closure}()
  #21 /home/forge/site/vendor/Company/admingui/src/Middleware/AuthAdminUser.php(39): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #22 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Company\Admingui\Middleware\AuthAdminUser-&gt;handle()
  #23 /home/forge/site/vendor/Company/core/src/Middleware/CampaignSession.php(37): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #24 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Company\Core\Middleware\CampaignSession-&gt;handle()
  #25 /home/forge/site/vendor/Company/core/src/Middleware/UriRedirect.php(29): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #26 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Company\Core\Middleware\UriRedirect-&gt;handle()
  #27 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #28 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Routing\Middleware\SubstituteBindings-&gt;handle()
  #29 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #30 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken-&gt;handle()
  #31 /home/forge/site/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #32 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession-&gt;handle()
  #33 /home/forge/site/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #34 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Session\Middleware\StartSession-&gt;handle()
  #35 /home/forge/site/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #36 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse-&gt;handle()
  #37 /home/forge/site/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #38 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies-&gt;handle()
  #39 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #40 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\Pipeline\Pipeline-&gt;then()
  #41 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Router-&gt;runRouteWithinStack()
  #42 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\Routing\Router-&gt;runRoute()
  #43 /home/forge/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\Routing\Router-&gt;dispatchToRoute()
  #44 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\Routing\Router-&gt;dispatch()
  #45 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Foundation\Http\Kernel-&gt;Illuminate\Foundation\Http\{closure}()
  #46 /home/forge/site/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(60): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #47 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Barryvdh\Debugbar\Middleware\InjectDebugbar-&gt;handle()
  #48 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #49 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest-&gt;handle()
  #50 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #51 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest-&gt;handle()
  #52 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #53 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\ValidatePostSize-&gt;handle()
  #54 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #55 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode-&gt;handle()
  #56 /home/forge/site/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #57 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\Proxy\TrustProxies-&gt;handle()
  #58 /home/forge/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}()
  #59 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Pipeline\Pipeline-&gt;then()
  #60 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel-&gt;sendRequestThroughRouter()
  #61 /home/forge/site/public/index.php(55): Illuminate\Foundation\Http\Kernel-&gt;handle()
  #62 {main}
  &quot;}</p>
  </blockquote>
  <p>Output of php artisan route:list</p>
  <blockquote>
  <p>[...]
  |        | GET|HEAD                               | admin/affiliate-urls                                     | admin.affiliate_urls.index                               | Company\Admingui\Controllers\AdminAffiliateUrlController@index                                  | web,admin                                            |
  [...]</p>
  </blockquote>
  <p>Content of web.php (routes in package)</p>
  <blockquote>
  <p>[...]
  Route::get('/admin/affiliate-urls','Company\Admingui\Controllers\AdminAffiliateUrlController@index')-&gt;name(&quot;admin.affiliate_urls.index&quot;);
  [...]</p>
  </blockquote>