belongsTo(Branch::class, 'parent_id'); } /** * Get the child branches of this branch */ public function children() { return $this->hasMany(Branch::class, 'parent_id'); } }