create(); /** @var AngelType $angelType */ $angelType = AngelType::factory()->create(); /** @var User $user */ $user = User::factory()->create(); $model = new ShiftEntry(); $model->shift()->associate($shift); $model->angelType()->associate($angelType); $model->user()->associate($user); $model->save(); $model = ShiftEntry::find(1); $this->assertEquals($shift->id, $model->shift->id); $this->assertEquals($angelType->id, $model->angelType->id); $this->assertEquals($user->id, $model->user->id); } }