• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Not finding model

#1
(06-24-2016, 04: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
Reply

#2
Please verify that NewsModel has its namespace declared in it's file. Also, make sure that it's located in application/Models directory.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.