, but thought maybe someone had some ideas. Trying to filter properties that belong to a particular project. Properties dont have a direct relationship to a project as you can see.
public function county(): BelongsTo { return $this->belongsTo(County::class, 'county_id'); } public function projects(): ?BelongsToMany { if ($this->county) { return $this->county->projects(); } return null; }
public function county(): BelongsTo { return $this->belongsTo(County::class, 'county_id'); } public function projects(): ?BelongsToMany { if ($this->county) { return $this->county->projects(); } return null; }