title: Laravel Route [admin.home.index] not defined
body: <p>This doesn't happen in my localhost and it only happens periodically and not a constant hit.</p>
  
  <p>I have tried:</p>
  
  <pre><code>php artisan optimize:clear
  php artisan route:clear
  php artisan config:clear
  php artisan cache:clear
  </code></pre>
  
  <p>Clean all cache files on <code>bootstrap/cache/*</code></p>
  
  <p>I'm using Laravel 5.7, weird thing is it only happens sometimes and not all the time...</p>
  
  <p>If i run php artisan <code>config:cache</code>, the whole site will be not usable, i'll need to run php artisan <code>config:clear</code> again to make it working again.</p>
  
  <p>Artisan list:</p>
  
  <p>All routes are there with their names etc.</p>
  
  <p>My route file:</p>
  
  <pre><code>Route::namespace('Admin')-&gt;group(function () {
  
          Route::name('admin.logout')-&gt;get('/logout', 'LoginController@logout');
  
          Route::name('admin.home.index')-&gt;get('/', 'HomeController@index');
  
          Route::name('admin.user.index')-&gt;get('/user', 'UserController@index');
          Route::get('/user/dt', 'UserController@dt')-&gt;name('admin.user.dt');        
          Route::get('/user/edit/{id}', 'UserController@edit')-&gt;name('admin.user.edit');
          Route::post('/user/edit/{id}', 'UserController@update')-&gt;name('admin.user.update');                
          Route::post('/user/adjust/{id}', 'UserController@adjust')-&gt;name('admin.user.adjust');
          Route::get('/user/get/{username}', 'UserController@getUserByUsername')-&gt;name('admin.user.get');
  
          Route::get('/cron/remove', 'CronController@remove');
      });
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>[2019-10-09 17:03:05] production.ERROR: Route [admin.home.index] not defined. (View: /var/www/html/admimsystem/resources/views/admin/layouts/default.blade.php) (View: /var/www/html/admimsystem/resources/views/admin/layouts/default.blade.php) {"userId":780616,"exception":"[object] (ErrorException(code: 0): Route [admin.home.index] not defined. (View: /var/www/html/admimsystem/resources/views/admin/layouts/default.blade.php) (View: /var/www/html/admimsystem/resources/views/admin/layouts/default.blade.php) at /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:374, ErrorException(code: 0): Route [admin.home.index] not defined. (View: /var/www/html/admimsystem/resources/views/admin/layouts/default.blade.php) at /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:374, InvalidArgumentException(code: 0): Route [admin.home.index] not defined. at /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:374)
  [stacktrace]
  #0 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(45): Illuminate\\View\\Engines\\CompilerEngine-&gt;handleViewException(Object(ErrorException), 1)
  #1 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(59): Illuminate\\View\\Engines\\PhpEngine-&gt;evaluatePath('/var/www/html/y...', Array)
  #2 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/View/View.php(142): Illuminate\\View\\Engines\\CompilerEngine-&gt;get('/var/www/html/y...', Array)
  #3 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/View/View.php(125): Illuminate\\View\\View-&gt;getContents()
  #4 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/View/View.php(90): Illuminate\\View\\View-&gt;renderContents()
  #5 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Http/Response.php(42): Illuminate\\View\\View-&gt;render()
  #6 /var/www/html/admimsystem/vendor/symfony/http-foundation/Response.php(202): Illuminate\\Http\\Response-&gt;setContent(Object(Illuminate\\View\\View))
  #7 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Router.php(747): Symfony\\Component\\HttpFoundation\\Response-&gt;__construct(Object(Illuminate\\View\\View))
  #8 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Router.php(719): Illuminate\\Routing\\Router::toResponse(Object(Illuminate\\Http\\Request), Object(Illuminate\\View\\View))
  #9 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Router.php(679): Illuminate\\Routing\\Router-&gt;prepareResponse(Object(Illuminate\\Http\\Request), Object(Illuminate\\View\\View))
  #10 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #11 /var/www/html/admimsystem/app/Http/Controllers/Controller.php(24): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #12 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(133): App\\Http\\Controllers\\Controller-&gt;App\\Http\\Controllers\\{closure}(Object(Illuminate\\Http\\Request), Object(Closure))
  #13 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #14 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #15 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Auth\\Middleware\\Authenticate-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure), 'admin')
  #16 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #17 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #18 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Routing\\Middleware\\SubstituteBindings-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure))
  #19 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #20 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(75): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #21 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure))
  #22 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #23 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(39): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #24 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Session\\Middleware\\AuthenticateSession-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure))
  #25 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #26 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #27 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\View\\Middleware\\ShareErrorsFromSession-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure))
  #28 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #29 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #30 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Session\\Middleware\\StartSession-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure))
  #31 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #32 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #33 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure))
  #34 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #35 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #36 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Cookie\\Middleware\\EncryptCookies-&gt;handle(Object(Illuminate\\Http\\Request), Object(Closure))
  #37 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline-&gt;Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
  #38 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline-&gt;Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
  #39 /var/www/html/admimsystem/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Pipeline\\Pipeline-&gt;then(Object(Closure))
  </code></pre>