mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-06 11:27:32 -08:00
934afa036f
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
/*
|
|
* Custom Fields Routes
|
|
*/
|
|
|
|
Route::group(['prefix' => 'fields', 'middleware' => ['auth']], function () {
|
|
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', ]
|
|
);
|
|
|
|
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'],
|
|
]);
|
|
});
|
|
|
|
Route::resource('fields', 'CustomFieldsController', [
|
|
'middleware' => ['auth'],
|
|
'parameters' => ['field' => 'field_id', 'fieldset' => 'fieldset_id'],
|
|
]);
|