Get Metada From Ar Model

Hi, i need some help for getting all metadata from an AR Model:


  • Name and Label attributes (columns): I know how i can get it.

foreach($model->getMetaData()->columns as $columns){


        echo $columns->name; // Nombre campo

        echo $model->getAttributeLabel($columns->name); // Label


  • Datatype of columns ?????

  • The same for Relations:

Get all Relations, Model/table related, columns of join ??????

Thanks in advance

Check these methods: