public function editor() { if ($this->edited()) { return $this->belongsTo('App\\User', 'edited_by'); } else { return null; } }