+ /**
+ * Get the associated page revisions, ordered by created date.
+ * @return mixed
+ */
+ public function revisions()
+ {
+ return $this->hasMany(PageRevision::class)->where('type', '=', 'version')->orderBy('created_at', 'desc');
+ }
+
+ /**
+ * Get the attachments assigned to this page.
+ * @return \Illuminate\Database\Eloquent\Relations\HasMany
+ */
+ public function attachments()