In ServiceProvider.php line 111: Undefined index: controllers_base_namespace
Issue
Starting with Laravel 6, you may now remove the namespace
property from the RouteServiceProvider
and register class-based routes or tuples instead. In Laravel 8, this became the default convention.
Upon switching to this convention, you may encounter this error if you have cached your routes using route:cache
as the cached value and property no longer match.
Solution
You may resolve this issue by clearing your cache with the route:clear
. However, due to this error, that command may not work. If not, you may forcibly remove the cached files from the bootstrap/cache
folder by running rm -f bootstrap/cache/route*.php
.