Iris Chuang
Iris Chuang

Reputation: 3

Laravel5 new controller in folder does not exist

I add a new controller in new folder. But I got an error:

ReflectionException in Container.php line 776: Class App\Http\Controllers\QRCode\ProductController does not exist

Here's my new controller:

namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
class ProductController extends Controller {
 ......
}

And my folder:

Folder

But if I put ProductController in folder-Controllers, it's work.

I don't know why.

Please help out!

Thanks in advance.

Upvotes: 0

Views: 1071

Answers (1)

Christopher Pecoraro
Christopher Pecoraro

Reputation: 136

use

namespace App\Http\Controllers\QRCode;

Upvotes: 1

Related Questions