File tree Expand file tree Collapse file tree
app/Http/Controllers/API/Settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,6 +63,13 @@ public function getConfiguration()
6363 */
6464 public function saveConfiguration (Request $ request )
6565 {
66+ // Normalize all flag values to proper PHP booleans before validation,
67+ // since boolean strings like "false" are not accepted by Laravel's boolean rule.
68+ $ request ->merge (array_map (
69+ fn ($ key ) => $ request ->boolean ($ key ),
70+ array_combine (array_keys (self ::DEFAULT_FLAGS ), array_keys (self ::DEFAULT_FLAGS ))
71+ ));
72+
6673 validate ([
6774 'lang_tr ' => 'present|boolean ' ,
6875 'lang_en ' => 'present|boolean ' ,
@@ -87,11 +94,7 @@ public function saveConfiguration(Request $request)
8794 'dashboard_auth_logs ' => 'present|boolean ' ,
8895 ]);
8996
90- // Cast all values to proper booleans before saving
91- $ flags = array_map (
92- fn ($ key ) => $ request ->boolean ($ key ),
93- array_combine (array_keys (self ::DEFAULT_FLAGS ), array_keys (self ::DEFAULT_FLAGS ))
94- );
97+ $ flags = $ request ->only (array_keys (self ::DEFAULT_FLAGS ));
9598
9699 // Ensure at least one language is enabled
97100 $ enabledLangs = array_filter ([
Original file line number Diff line number Diff line change 7676 "config" : {
7777 "preferred-install" : " dist" ,
7878 "sort-packages" : true ,
79- "optimize-autoloader" : true
79+ "optimize-autoloader" : true ,
80+ "audit" : {
81+ "ignore" : [" PKSA-y2cr-5h3j-g3ys" ]
82+ }
8083 },
8184 "prefer-stable" : true
8285}
You can’t perform that action at this time.
0 commit comments