the problem is a bit strange, I'm fighting with it since 2 days and before I post it as a bug just wanted to make sure this is not my mistake.
I have a clean CakePHP copy, I have a DB which is setup and Cake can connect to my DB with no problem. in my DB I have a table named "news", and I have a controller with the following code:
<?php
class UsersController extends AppController {
public $uses = array('News');
public function news(){
$news = $this->News->find('all');
var_dump($news);
die;
}
}
as long as I dont create the model file for my table, this query runs successfully, but as soon as I create the following Model file (save as News.php in model folder) I see the error that comes after code:
<?php
class NewsModel extends AppModel {
}
the error:
Fatal error: Cannot redeclare class NewsModel in C:\...\cakephp\app\Model\News.php on line 4
I'm on the windows and running php > 5.2.8