public function map(Fluent $builder) { $builder->increments('id'); $builder->string('name'); $builder->belongsTo(StubEntity::class, 'parent')->inversedBy('parent'); $builder->hasMany(StubEntity::class, 'children')->mappedBy('parent'); $builder->hasOne(StubEntity::class, 'one')->ownedBy('theOther'); $builder->belongsToMany(StubEntity::class, 'many')->owns('theWorld'); }