bd 1.0
This commit is contained in:
@ -9,15 +9,20 @@ class FormInputModel extends Model
|
||||
protected $table = "form_input";
|
||||
|
||||
protected $fillable = [
|
||||
'form_id', 'input_type_id', 'params'
|
||||
'form_id', 'input_type_id', 'params', 'inputType'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
||||
];
|
||||
|
||||
public function inputType()
|
||||
public function inputType(): \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
{
|
||||
return $this->hasOne(InputTypeModel::class, "id");
|
||||
return $this->hasOne(InputTypeModel::class, "id", "input_type_id");
|
||||
}
|
||||
|
||||
public function inputValue()
|
||||
{
|
||||
return $this->hasMany(InputValueModel::class, "form_input_id", "id");
|
||||
}
|
||||
}
|
@ -18,6 +18,6 @@ class FormModel extends Model
|
||||
|
||||
public function fields()
|
||||
{
|
||||
return $this->hasMany(FormInputModel::class, "form_id");
|
||||
return $this->hasMany(FormInputModel::class, "form_id", "id");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user