Get all model relationships


Is there anyway to get all the relationship of a model. I know there is a thread here

Stackoverflow thread

But this is somehow null in every case.

Any direction here will be very helpful.

Thanks alot.

The Rain model has a getRelationDefinitions() method that does exactly that.

foreach ($model->getRelationDefinitions() as $type => $relations) {
    foreach ($relations as $relation => $config) {

@marco.grueter thanks alot. this is all i was looking for.