Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: Class 'AppController' not found error

Tags:

php

cakephp

Can anyone tell me what might be the source of this error. I have tried all solutions I found online with no avail. I just installed a cakePHP framework and I am getting this error on index.cpt page...

Error: Fatal error: Class 'AppController' not found in [mypath] on line 2

<?php
class HomeController extends AppController {
     function index() {
     //nothing's here
     }
 }
?>

The above is my code...homeController.php and appController.php are on the same folder

like image 486
charles okojie Avatar asked Mar 22 '26 05:03

charles okojie


1 Answers

This solved my problem after many searching

<?php
    namespace App\Controller;
    use App\Controller\AppController;
    class HomeController extends AppController{
        public function index(){

        }
    }
like image 198
charles okojie Avatar answered Mar 24 '26 19:03

charles okojie



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!