Ad

Class Not Found - Laravel 5.1

- 1 answer

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.

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\[email protected]');
get('/content', 'includes\[email protected]');
get('/openModel', 'includes\[email protected]');

thanks for the help.

Ad

Answer

You declared use Horsefly\Http\Requests;

Just change it to

use Horsefly\Requests;

or use Request;

Ad
source: stackoverflow.com
Ad