CodeIgniter Forums
Cpanel Class not found - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Cpanel Class not found (/showthread.php?tid=88170)



Cpanel Class not found - bolajimicheal - 08-02-2023

Goodday,
My project is completed it is working fine both in development mode and production mode on my computer.
But it is not working in cPanel. Always saying classes not found --- $exception Error#62 (7) "Class "App\Models\Category\CategoryModel" not found"
I have followed the intsruction from https://forum.codeigniter.com/showthread.php?tid=76779

If I did not instantiate CategoryModel it is working fine.
But I have a lot of Models, Entities, Libraries and so on that I need to instantiate or use


For Example
PHP Code:
<?php

namespace App\Controllers;

use 
App\Models\Category\CategoryModel;

class 
Home extends BaseController {
    
    
public function index() {
        try {
            $categoryModel = new CategoryModel();

            $data['title'] = 'Homepage';
            $data['navbar'] = 'This is navbar';
        
            
return view('index'$data);
        
        
} catch (\Throwable $exception) {
            d($exception);
            //\Sentry\captureException($exception);
        }
    }

Or Am I doing the wrong thing