snipe-it/routes/web/fields.php
Brady Wetherington d80604f2ac Most of the basics are working, but not done and lots of debug messages are about
I picked up the change that picked a point-release difference on the AWS library since that usually
works out for us (x.y.1 vs. x.y.2 - usually a good call)
2021-10-04 22:06:48 -07:00

59 lines
1.3 KiB
PHP

<?php
use App\Http\Controllers\CustomFieldsController;
use App\Http\Controllers\CustomFieldsetsController;
use Illuminate\Support\Facades\Route;
/*
* Custom Fields Routes
*/
Route::group(['prefix' => 'fields', 'middleware' => ['auth']], function () {
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');
Route::post(
'fieldsets/{id}/associate',
[
CustomFieldsetsController::class,
'associate'
]
)->name('fieldsets.associate');
Route::resource('fieldsets', CustomFieldsetsController::class, [
'parameters' => ['fieldset' => 'field_id', 'field' => 'field_id'],
]);
});
Route::resource('fields', CustomFieldsController::class, [
'parameters' => ['field' => 'field_id'],
]);