Home > Enterprise >  Error when listing all routes in Laravel, ReflectionException Class "Postcontroller" does
Error when listing all routes in Laravel, ReflectionException Class "Postcontroller" does

Time:01-27

A basic laravel app with Postcontroller is been created using

php artisan make:controller Postcontroller --resource

however when listing the routes (php artisan route:list)

it shows error that Class "Postcontroller" does not exist eve though it exists.

enter image description here

CodePudding user response:

Please double-check that inside the Postcontroller.php the class name is proper.

namespace App\Http\Controllers;

class Postcontroller extends Controller{

} then clear cache php artisan cache:clear php artisan config:clear php artisan route:cache

  • Related