mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Allow settings to be overridden in request
This commit is contained in:
parent
48fb4f2439
commit
36210f1c6a
|
@ -61,9 +61,17 @@ class LabelsController extends Controller
|
|||
$testAsset->model->category->id = 999999;
|
||||
$testAsset->model->category->name = 'Test Category';
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
if (request()->has('settings')) {
|
||||
$overrides = request()->get('settings');
|
||||
foreach ($overrides as $key => $value) {
|
||||
$settings->$key = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return (new LabelView())
|
||||
->with('assets', collect([$testAsset]))
|
||||
->with('settings', Setting::getSettings())
|
||||
->with('settings', $settings)
|
||||
->with('template', $template)
|
||||
->with('bulkedit', false)
|
||||
->with('count', 0);
|
||||
|
|
Loading…
Reference in a new issue