由父母的父母进行的Laravel查询

I have a few belongsTo relations in an app, with the 'lowest' child being an Element. The models have the following functions:

// Element
public function field(){
    return $this->belongsTo('Field');
} 
// Field
public function section(){
    return $this->belongsTo('Section');
} 
// Section
public function form(){
    return $this->belongsTo('Form');
} 

How can I say something along the lines of:

$elements = Element::where('field.section.form.id', '=', 1);

And return all the elements that belong to the form with an ID of 1. Eager loading has served me well but I'm confused if there is a way of doing this.

You can use whereHas (also with nested relationships since the latest 4.2 release. make sure to update to 4.2.17 if you haven't already)

$elements = Element::whereHas('field.section.form', function($q){
   $q->where('id', 1);
})->get();