CodeIgniter Forums
[split] Not finding model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: [split] Not finding model (/thread-67329.html)



[split] Not finding model - patelprem1992 - 02-11-2017

(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



RE: [split] Not finding model - kilishan - 02-11-2017

Please verify that NewsModel has its namespace declared in it's file. Also, make sure that it's located in application/Models directory.