Welcome Guest, Not a member yet? Register   Sign In
Cpanel Class not found
#1

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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB