路由:列表在本地机器上工作,但在laravel的服务器上给出错误

路由:列表在本地机器上工作,但在laravel的服务器上给出错误,laravel,routes,runtime-error,vps,Laravel,Routes,Runtime Error,Vps,我正在更新我的服务器代码,所有的工作都很好,甚至迁移和种子植入 但是当我尝试登录URL时,它给了我404错误,因此我进行了检查,并在该过程中运行了PHP artisan route:list命令 并得到如下错误: PHP artisan route: list Illuminate\Contracts\Container\BindingResolutionException : Target class [App\Http\Controllers\Api\V1\UserControll

我正在更新我的服务器代码,所有的工作都很好,甚至迁移和种子植入

但是当我尝试
登录URL
时,它给了我
404
错误,因此我进行了检查,并在该过程中运行了
PHP artisan route:list
命令

并得到如下错误:

PHP artisan route: list

   Illuminate\Contracts\Container\BindingResolutionException  : Target class [App\Http\Controllers\Api\V1\UserController] does not exist.

  at /var/www/html/x/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
    801|
    802|         try {
    803|             $reflector = new ReflectionClass($concrete);
    804|         } catch (ReflectionException $e) {
  > 805|             throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
    806|         }
    807|
    808|         // If the type is not instantiable, the developer is attempting to resolve
    809|         // an abstract type such as an Interface or Abstract Class and there is

  Exception trace:

  1   Illuminate\Foundation\Console\RouteListCommand::Illuminate\Foundation\Console\{closure}()
      [internal]:0

  2   ReflectionException::("Class App\Http\Controllers\Api\V1\UserController does not exist")
      /var/www/html/x/vendor/laravel/framework/src/Illuminate/Container/Container.php:803

  Please use the argument -v to see more details.

它说找不到给定的控制器。我亲自检查了这个文件夹,它已经存在了。权限是正确的,而且如果我在本地计算机上运行相同的命令,我会在相同的代码上获得
路由列表


已尝试
composer dump autoload
composer update
但由于存在错误,仍然没有使用该选项。那么这里真正的问题是什么呢。如何解决这个问题?

ok找到了真正的问题。如下图所示

App\Http\Controllers\Api\V1\UserController 

WAS CHANGED TO

App\Http\Controllers\API\V1\UserController
我认为只有windows对
Caps
small
字符不区分大小写。在使用Mac时,我始终无法找到它


只是碰巧检查了路由列表,因为它可能是区分大小写的,结果是。My bad://

您的本地操作系统是什么?请尝试以下命令:php artisan cache:clear我的本地操作系统是mac。我还尝试清除服务器上的缓存、视图和路由。您的路由是什么?来自laravel的正常身份验证路由