]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/Technique.php
tech relations
[alttp.git] / app / Models / Technique.php
index 256afc06ea6abe051e47fa08ae39b421e43950f9..f0a29d39ec3e975bf4ff973220ab83e50da25555 100644 (file)
@@ -17,6 +17,13 @@ class Technique extends Model
                        ->using(TechniqueChapter::class);
        }
 
+       public function relations() {
+               return $this
+                       ->belongsToMany(Technique::class, 'technique_relations', 'from_id', 'to_id')
+                       ->withPivot('type')
+                       ->using(TechniqueRelation::class);
+       }
+
        public function translations() {
                return $this->hasMany(TechniqueTranslation::class);
        }