2016-12-15 19:17:07 -08:00
|
|
|
<?php
|
2021-06-10 13:17:14 -07:00
|
|
|
|
|
|
|
use App\Http\Controllers\CustomFieldsController;
|
|
|
|
use App\Http\Controllers\CustomFieldsetsController;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
2021-06-10 13:19:27 -07:00
|
|
|
|
2016-12-15 19:17:07 -08:00
|
|
|
/*
|
|
|
|
* Custom Fields Routes
|
|
|
|
*/
|
|
|
|
|
2021-06-10 13:15:52 -07:00
|
|
|
Route::group(['prefix' => 'fields', 'middleware' => ['auth']], function () {
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'required/{fieldset_id}/{field_id}',
|
|
|
|
[
|
|
|
|
CustomFieldsetsController::class,
|
|
|
|
'makeFieldRequired'
|
|
|
|
]
|
|
|
|
)->name('fields.required');
|
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'optional/{fieldset_id}/{field_id}',
|
|
|
|
[
|
|
|
|
CustomFieldsetsController::class,
|
|
|
|
'makeFieldOptional'
|
|
|
|
]
|
|
|
|
)->name('fields.optional');
|
|
|
|
|
|
|
|
Route::get(
|
|
|
|
'{field_id}/fieldset/{fieldset_id}/disassociate',
|
|
|
|
[
|
|
|
|
CustomFieldsetsController::class,
|
|
|
|
'deleteFieldFromFieldset'
|
|
|
|
]
|
|
|
|
)->name('fields.disassociate');
|
|
|
|
|
2021-09-30 16:21:23 -07:00
|
|
|
Route::post(
|
2021-06-12 01:35:29 -07:00
|
|
|
'fieldsets/{id}/associate',
|
|
|
|
[
|
|
|
|
CustomFieldsetsController::class,
|
|
|
|
'associate'
|
|
|
|
]
|
2021-09-30 16:21:23 -07:00
|
|
|
)->name('fieldsets.associate');
|
2016-12-15 19:17:07 -08:00
|
|
|
|
2021-06-10 13:17:14 -07:00
|
|
|
Route::resource('fieldsets', CustomFieldsetsController::class, [
|
2021-06-12 01:35:29 -07:00
|
|
|
'parameters' => ['fieldset' => 'field_id', 'field' => 'field_id'],
|
|
|
|
]);
|
|
|
|
|
2017-01-25 04:34:11 -08:00
|
|
|
|
2021-06-12 01:35:29 -07:00
|
|
|
});
|
|
|
|
|
2021-06-29 20:58:04 -07:00
|
|
|
|
|
|
|
Route::resource('fields', CustomFieldsController::class, [
|
2021-06-12 01:35:29 -07:00
|
|
|
'parameters' => ['field' => 'field_id'],
|
2017-01-25 04:34:11 -08:00
|
|
|
]);
|
2021-06-12 01:35:29 -07:00
|
|
|
|
|
|
|
|
2021-06-29 20:58:04 -07:00
|
|
|
|