Reputation: 505
I am new to Lumen, and I got error when using Postman: ReflectionException Class App\Http\Controllers\PostsController does not exist
Here is my PostsController.php
namespace App\Http\Controller;
use App\Post;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PostsController extends Controller{
/*content*/
}
I already checked location of my controller. I also read the same problem and tried the solutions, but it was not work for me. Can anyone tell me how to fix this? Thanks before
Upvotes: 3
Views: 1587
Reputation: 7509
Controller's namespace is wrong, Check the namespace. Good luck
namespace App\Http\Controllers;
Upvotes: 2
Reputation: 1633
You have wrong namespace in your controller file.
You need to change it to Controllers
namespace App\Http\Controllers;
Upvotes: 2