user()->can('create', GroupSetting::class); } public function rules() { return [ 'name' => 'required', 'settings' => 'json', ] } public function sanitize() { $input = $this->all(); $this->replace($input); } public function messages() { return [ 'settings' => 'settings must be a valid json structure' ]; } }