$objects = array( "propertype", "garagetype", "amenities", "petpolicy" ); foreach ( $objects as $relation ) { $listing->$relation->get(); }