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

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

IlluminateContractsContainerBindingResolutionException
Target class [ApphttpControllersScheduleController] does not exist.

知道我的电脑上一切正常

路线

Route::get('/schedules','ApphttpControllersScheduleController@openPage');

调度控制器

<?php

namespace AppHttpControllers;

use IlluminateHttpRequest;
use AppModelsschedule;
Use File;
class ScheduleController extends Controller
{

回答

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

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

Route::get('/schedules','AppHttpControllersScheduleController@openPage');

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


以上是000webhostapp控制器上的Laravel项目不存在的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>