I have a job to import excel file and save the data to database via cakephp, the probleme is, this application allow user to choose the table that he want to used to save the data from excel file, so i need to list all the model name, i have search through google how to get all model name but i can't find it. I just can get all the table name, but this is not enough. I must know all the model name, please help me...
I can get all the field name uses this code:
$this->loadModel('Person');
$fieldsArray=$this->Person->find('all');
$fieldsArray=Set::extract('/0/Person',$fieldsArray);
$fieldNames=array_keys($fieldsArray[0]['Person']);
debug($fieldNames);
but as you can see, i have to know the model name, i can't solve this problem, please help me..
Best regards...
$Model = App::objects('Model');
pr($Model);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With