2016-12-15 19:17:07 -08:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* Custom Fields Routes
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-11 05:16:56 -08:00
|
|
|
Route::group([ 'prefix' => 'fields','middleware' => ['auth'] ], function () {
|
2016-12-15 19:17:07 -08:00
|
|
|
|
2021-11-05 10:53:48 -07:00
|
|
|
Route::post('required/{fieldset_id}/{field_id}',
|
2020-04-24 00:39:32 -07:00
|
|
|
['uses' => 'CustomFieldsetsController@makeFieldRequired',
|
|
|
|
'as' => 'fields.required']
|
|
|
|
);
|
|
|
|
|
2021-11-05 10:53:48 -07:00
|
|
|
Route::post('optional/{fieldset_id}/{field_id}',
|
2020-04-24 00:39:32 -07:00
|
|
|
['uses' => 'CustomFieldsetsController@makeFieldOptional',
|
|
|
|
'as' => 'fields.optional']
|
|
|
|
);
|
|
|
|
|
2021-11-05 10:53:48 -07:00
|
|
|
Route::post('{field_id}/fieldset/{fieldset_id}/disassociate',
|
2016-12-15 19:17:07 -08:00
|
|
|
['uses' => 'CustomFieldsController@deleteFieldFromFieldset',
|
|
|
|
'as' => 'fields.disassociate']
|
|
|
|
);
|
|
|
|
|
|
|
|
Route::post('fieldsets/{id}/associate',
|
|
|
|
['uses' => 'CustomFieldsetsController@associate',
|
|
|
|
'as' => 'fieldsets.associate']
|
|
|
|
);
|
|
|
|
|
|
|
|
Route::resource('fieldsets', 'CustomFieldsetsController', [
|
|
|
|
'parameters' => ['fieldset' => 'field_id', 'field' => 'field_id']
|
|
|
|
]);
|
2020-04-24 00:39:32 -07:00
|
|
|
|
|
|
|
|
2016-12-15 19:17:07 -08:00
|
|
|
});
|
2017-01-25 04:34:11 -08:00
|
|
|
|
|
|
|
Route::resource('fields', 'CustomFieldsController', [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2017-01-25 04:34:11 -08:00
|
|
|
'parameters' => ['field' => 'field_id', 'fieldset' => 'fieldset_id']
|
|
|
|
]);
|