000webhostapp 控制器上的 Laravel 项目不存在

-1 php web-hosting laravel

我将我的 laravel 项目版本 8 上传到 000webhostapp 我做了所有必需的配置。该项目在我的本地主机上正常运行,但是在 000webhost 上使用它时,视图正常显示,但是当有一个功能想要访问控制器时,我收到此错误

Illuminate\Contracts\Container\BindingResolutionException
Target class [App\http\Controllers\ScheduleController] does not exist.
Run Code Online (Sandbox Code Playgroud)

知道我的电脑上一切正常

路线

Route::get('/schedules','App\http\Controllers\ScheduleController@openPage');
Run Code Online (Sandbox Code Playgroud)

调度控制器

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\schedule;
Use File;
class ScheduleController extends Controller
{
Run Code Online (Sandbox Code Playgroud)

lag*_*box 5

App\http\Controllers\ScheduleController不一样App\Http\Controllers\ScheduleController。您的控制器位于App\Http\Controllers命名空间中。对于小写,http它正在寻找一个名为httpHttp加载此类的文件夹。

调整路由定义以在正确情况下使用 FQCN:

Route::get('/schedules','App\Http\Controllers\ScheduleController@openPage');
Run Code Online (Sandbox Code Playgroud)

您可能从不区分大小写的文件系统转变为区分大小写的文件系统。