I have a task to import an excel file and save the data to the database through cakephp, the problem is that this application allows the user to select the table that he wants to use to save the data from the excel file, so I need to list all the model name, I have google search how to get all model name, but I can not find it. I just can get the whole table name, but this is not enough. I need to know the whole model name, please help me ...
I can get the whole field name using 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 need to know the model name, I can not solve this problem, please help me ..
Best wishes...
source share