Hello, what is the simplest way to get an array of table columns names in controler? I found this elsewhere: $this->Model->schema()->columns(), nevertheless it doesnot work … Please could anyone help me and describe the code in detail? Thank you!
What version of Cake are you using? What error do you get with the code you’ve tried?
Thank you for your help. I use version 4.2.5, I need to get an array with column names in my controller index action.
Here is the code:
And here is the error (I declared to use Cake\Database\Scheme):
Thank you!