コード例 #1
0
ファイル: StubEntityMapping.php プロジェクト: guiwoda/fluent
 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');
 }
コード例 #2
0
ファイル: FluentDriverTest.php プロジェクト: guiwoda/fluent
 public function map(Fluent $builder)
 {
     $builder->increments('id');
     $builder->string('name');
 }