We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0432ee commit 02e0f0eCopy full SHA for 02e0f0e
src/Http/Controllers/CustomerGroups.php
@@ -65,7 +65,11 @@ public function __construct()
65
66
public function index_onSetDefault()
67
{
68
- if (CustomerGroup::updateDefault(post('default'))) {
+ $data = $this->validate(post(), [
69
+ 'default' => 'required|integer|exists:'.CustomerGroup::class.',customer_group_id',
70
+ ]);
71
+
72
+ if (CustomerGroup::updateDefault($data['default'])) {
73
flash()->success(sprintf(lang('admin::lang.alert_success'), lang('igniter.user::default.customer_groups.alert_set_default')));
74
}
75
0 commit comments