CodeIgniter Forums

Full Version: [split] Not finding model
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(06-24-2016, 03:29 PM)I am facing a big problem with codeigniter 4 Wrote: [ -> ]namespace App\Controllers;

use CodeIgniter\Controller;

use App\Models\NewsModel;

class News extends Controller{
  public function index()
        $model = new NewsModel();



error:Class 'App\Models\NewsModel' not found
Please verify that NewsModel has its namespace declared in it's file. Also, make sure that it's located in application/Models directory.