Fixed routes for newer format (l8)

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-11-15 20:16:40 -08:00
parent 65d1855b38
commit 8a747be3a0

View file

@ -7,34 +7,35 @@
Route::group([ 'prefix' => 'fields','middleware' => ['auth'] ], function () {
Route::post('required/{fieldset_id}/{field_id}',
['uses' => 'CustomFieldsetsController@makeFieldRequired',
'as' => 'fields.required']
);
Route::post(
'required/{fieldset_id}/{field_id}',
[CustomFieldsetsController::class, 'makeFieldRequired']
)->name('fields.required');
Route::post('optional/{fieldset_id}/{field_id}',
['uses' => 'CustomFieldsetsController@makeFieldOptional',
'as' => 'fields.optional']
);
Route::post(
'optional/{fieldset_id}/{field_id}',
[CustomFieldsetsController::class, 'makeFieldOptional']
)->name('fields.optional');
Route::post('{field_id}/fieldset/{fieldset_id}/disassociate',
['uses' => 'CustomFieldsController@deleteFieldFromFieldset',
'as' => 'fields.disassociate']
);
Route::post(
'{field_id}/fieldset/{fieldset_id}/disassociate',
[CustomFieldsController::class, 'deleteFieldFromFieldset']
)->name('fields.disassociate');
Route::post('fieldsets/{id}/associate',
['uses' => 'CustomFieldsetsController@associate',
'as' => 'fieldsets.associate']
);
Route::post(
'fieldsets/{id}/associate',
[CustomFieldsController::class, 'associate']
)->name('fieldsets.associate');
Route::resource('fieldsets', 'CustomFieldsetsController', [
Route::resource('fieldsets', CustomFieldsetsController::class, [
'parameters' => ['fieldset' => 'field_id', 'field' => 'field_id']
]);
});
Route::resource('fields', 'CustomFieldsController', [
Route::resource('fields', CustomFieldsController::class, [
'middleware' => ['auth'],
'parameters' => ['field' => 'field_id', 'fieldset' => 'fieldset_id']
'parameters' => ['field' => 'field_id', 'fieldset' => 'fieldset_id'],
]);