Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReflectionException Class App\Http\Controllers\PostsController does not exist Lumen 5.5

Tags:

php

laravel

lumen

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

like image 640
arnold_p Avatar asked Apr 22 '26 17:04

arnold_p


1 Answers

Controller's namespace is wrong, Check the namespace. Good luck

namespace App\Http\Controllers;
like image 174
Mahdi Younesi Avatar answered Apr 25 '26 07:04

Mahdi Younesi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!