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
|
|
|
|
2020-04-24 00:47:19 -07:00
|
|
|
Route::get('required/{fieldset_id}/{field_id}',
|
|
|
|
['uses' => 'CustomFieldsetsController@makeFieldRequired',
|
|
|
|
'as' => 'fields.required']
|
|
|
|
);
|
|
|
|
|
|
|
|
Route::get('optional/{fieldset_id}/{field_id}',
|
|
|
|
['uses' => 'CustomFieldsetsController@makeFieldOptional',
|
|
|
|
'as' => 'fields.optional']
|
|
|
|
);
|
|
|
|
|
2016-12-15 19:17:07 -08:00
|
|
|
Route::get('{field_id}/fieldset/{fieldset_id}/disassociate',
|
|
|
|
['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']
|
|
|
|
]);
|
|
|
|
});
|
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']
|
|
|
|
]);
|