validate([ 'auditionName' => ['required'], 'auditionAbbreviation' => ['required', 'max:8'], 'organizerName' => ['required'], 'organizerEmail' => ['required', 'email'], 'registrationCode' => ['required'], 'fee_structure' => ['required', 'in:oneFeePerEntry,oneFeePerStudent'], // Options should align with the boot method of InvoiceDataServiceProvider 'late_fee' => ['nullable', 'numeric', 'min:0'], 'school_fee' => ['nullable', 'numeric', 'min:0'], ]); // Store currency values as cents $validData['late_fee'] = $validData['late_fee'] * 100; $validData['school_fee'] = $validData['school_fee'] * 100; // TODO implement olympic scoring foreach ($validData as $key => $value) { Settings::set($key, $value); } return to_route('audition-settings')->with('success', 'Settings Saved'); } }