Tuesday, February 24, 2015

Re: Get the column type in the Controller Cake 3.0

It works! Thank you!

Em terça-feira, 24 de fevereiro de 2015 11:11:25 UTC-3, José Lorenzo escreveu:
$this->Articles->schema()->columnType('fieldname')

On Tuesday, February 24, 2015 at 1:56:57 PM UTC+1, Felipe Silveira wrote:
Hi Guys,

I'm using Cake 3.0 and already felt some differences, I need to check what type of field in the Controller.

In cake 2.0 I checked this way:
$ this-> Model-> GetColumnType ('fieldname')

In cake 3 there this method to the table object, the closest I found was the ColumnType, but when I try to access this method in the controller the error of talking cake that does not exist.

Someone can help me?

Thx!

Att,
Felipe Silveira Mendes
Twitter - Linked-In
Web Developer
(31) 8370-9090 (Claro)


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: