[英]Class Not Found - Laravel 5.1
I have some issue with my controller. 我的控制器有问题。 After I move the controller to sub folder it always tell me 将控制器移到子文件夹后,它总是告诉我
Class 'Horsefly\Request' not found
I don't know what it is the problem. 我不知道这是什么问题。 I did the same in admin sub folder and it worked fine. 我在admin子文件夹中做了同样的事情,并且工作正常。
Controller: 控制器:
<?php
namespace Horsefly\Http\Controllers\includes;
use Illuminate\Http\Request;
use Horsefly\Http\Requests;
use Horsefly\Ebooks;
use Horsefly\Settings;
use Horsefly\Http\Controllers\Controller;
class EbooksController extends Controller {
}
Routes 路线
get('/navpage', 'includes\EbooksController@navpage');
get('/content', 'includes\EbooksController@content');
get('/openModel', 'includes\EbooksController@openModel');
thanks for the help. 谢谢您的帮助。
You declared use Horsefly\\Http\\Requests;
您声明use Horsefly\\Http\\Requests;
Just change it to 只需将其更改为
use Horsefly\\Requests;
or use Request;
或use Request;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.