php - I cant edit and view posts in cakePhp tutorial -


i watched cakephp blog totorial , have done steps, shows error:

error in: root/src/template/posts/view.ctp, line 1 caused using auto-tables?

some of table objects in application created instantiating cake\orm\table instead of other specific subclass.

this cause exception. auto-tables created under following circumstances:

the class specified table not exist. table created typo:

tableregistry::get('atricles'); 

the class file has typo in name or incorrect namespace: class atricles extends table. file containing class has typo or incorrect casing: atricles.php table used using associations association has typo:

$this->belongsto('atricles'); 

the table class resides in plugin no plugin notation used in association definition.

please try correcting issue following table aliases:

posts

i see posts(which have been added in console), can't see 1 post, edit , add new.

you need make sure table object in model same name table in database. in case database table should named articles. if want use different database table in model can use in table object:

$this->table('my_table'); 

you can read more on website: http://book.cakephp.org/3.0/en/orm/table-objects.html


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -