Skip to content

Commit c86858f

Browse files
NorgulStyleCIBot
andauthored
Form template route move #patch (#68)
* Moved form templates to api routes * Apply fixes from StyleCI * Alphabetical order Co-authored-by: StyleCI Bot <bot@styleci.io>
1 parent 3980fb4 commit c86858f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

config/asseco-custom-fields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
'models' => [
3030
'custom_field' => CustomField::class,
3131
'form' => Form::class,
32+
'form_template' => FormTemplate::class,
3233
'plain_type' => PlainType::class,
34+
'relation' => Relation::class,
3335
'remote_type' => RemoteType::class,
3436
'selection_type' => SelectionType::class,
3537
'selection_value' => SelectionValue::class,
36-
'relation' => Relation::class,
3738
'validation' => Validation::class,
3839
'value' => Value::class,
39-
'form_template' => FormTemplate::class,
4040
],
4141

4242
'plain_types' => [

routes/api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757

5858
Route::post('forms/{form_name}/validate', [FormController::class, 'validateAgainstCustomInput'])->name('forms.validate');
5959
Route::apiResource('forms', FormController::class);
60+
Route::apiResource('form-templates', FormTemplateController::class);
6061
});
6162
});
62-
Route::apiResource('form-templates', FormTemplateController::class);

src/App/Models/FormTemplate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function createCustomFieldValues(array $formData = []): array
4545

4646
$values[] = $customField->values()->updateOrCreate([
4747
'model_type' => $this->getMorphClass(),
48-
'model_id' => $this->id,
48+
'model_id' => $this->id,
4949
],
5050
[$type => $formCustomField]
5151
);

0 commit comments

Comments
 (0)