Transformed into pivot models and Created ResumeSlotValue
This commit is contained in:
@@ -4,6 +4,8 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class ResumeComponentDataType extends Model
|
||||
{
|
||||
@@ -14,4 +16,16 @@ class ResumeComponentDataType extends Model
|
||||
'data_structure',
|
||||
'vue_component_name'
|
||||
];
|
||||
|
||||
public function inputs(): HasMany
|
||||
{
|
||||
return $this->hasMany(ResumeComponentInput::class);
|
||||
}
|
||||
|
||||
public function components(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(ResumeComponent::class)
|
||||
->using(ResumeComponentInput::class)
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user