This commit is contained in:
kali
2024-04-03 18:25:38 +03:00
parent 09b5167a1a
commit cfe5b3cca5
17 changed files with 227 additions and 147 deletions

View File

@ -9,7 +9,7 @@ class FormInputModel extends Model
protected $table = "form_input";
protected $fillable = [
'form_id', 'input_type_id', 'params', 'inputType'
'form_id', 'input_type_id', 'label', 'name', 'params', 'priority', 'inputType'
];
protected $hidden = [

View File

@ -18,6 +18,6 @@ class FormModel extends Model
public function fields()
{
return $this->hasMany(FormInputModel::class, "form_id", "id");
return $this->hasMany(FormInputModel::class, "form_id", "id")->orderBy("priority");
}
}