Added the data to the Resume <-> Resume Component relationship
Some checks failed
linter / quality (push) Successful in 3m3s
tests / ci (push) Failing after 6m29s

This commit is contained in:
2025-08-16 14:51:21 +02:00
parent 8fdd3fc130
commit c9f499cf2d
3 changed files with 9 additions and 2 deletions

View File

@@ -27,6 +27,9 @@ class Resume extends Model
public function components(): BelongsToMany public function components(): BelongsToMany
{ {
return $this->belongsToMany(ResumeComponent::class, 'resume_resume_component')->withPivot('order')->withTimestamps()->orderBy('order'); return $this->belongsToMany(ResumeComponent::class, 'resume_resume_component')
->withPivot('order', 'data')
->withTimestamps()
->orderBy('order');
} }
} }

View File

@@ -20,6 +20,8 @@ class ResumeComponent extends Model
public function resumes(): BelongsToMany public function resumes(): BelongsToMany
{ {
return $this->belongsToMany(Resume::class, 'resume_resume_component')->withPivot('order')->withTimestamps(); return $this->belongsToMany(Resume::class, 'resume_resume_component')
->withPivot('order', 'data')
->withTimestamps();
} }
} }

View File

@@ -21,6 +21,8 @@ return new class extends Migration
$table->integer('order')->default(0); $table->integer('order')->default(0);
$table->json('data')->comment('JSON structure to define the data for the resume component');
$table->timestamps(); $table->timestamps();
}); });
} }