php - CakePhp model name conventions -


i using cakephp,

$this->calldetail->save($data); 

database table name calldetails

and class code

class calldetail extends appmodel {      var $name = "calldetail";   } 

however calldetail not working, should change model name to

it seems not load model. first have load model in controller. there 2 way load model

one loadmodel

$this->loadmodel('article'); 

another $uses variable

public $uses = array('article'); 

update

or can use $usetable specify table name

public $usetable = 'exmp'; // model uses database table 'exmp' 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -