I make a plugin Blog with cakephp3. When I call the url /blog/edit/3, all is good, the form inputs are filled.
I have a class \Blog\Model\Table\ArticlesTable (file location: ROOT/plugins/Blog/src/Model/Table/ArticlesTable.php)
Here the class :
<?php
namespace Blog\Model\Table;
use \Cake\ORM\Table;
use \Cake\Validation\Validator;
class ArticlesTable extends Table
{
public function initialize(array $config)
{
//die('IN ArticlesTable::initialize');
$this->table('articles');
$this->primaryKey('id');
$this->addBehavior('Timestamp');
}
public function validationDefault(Validator $validator)
{
...
}
}
In the debugar, I see the message :
Generated Models
The following Table objects used Cake\ORM\Table instead of a concrete class: Articles
- I check namespace and the case of file
- I run command composer dumpautoloader
But my class is not loaded
Some one has an idea about my problem ?
Thanks
Phil
use \Cake\ORM\Table;butuse Cake\ORM\Table;. I mean, remove the first slash. I'll recommend you to use bake to generate the base code.Blog/src/Model/Entity/Article.phpandBlog/Model/Entity/Article.phpand run the command :bin\cake.bat bake model Articles -p BlogFiles are created but the problem persists : The following Table objects used Cake\ORM\Table instead of a concrete class: Articles