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.
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