user()->isAdmin(); } public function rules() { $rules = [ 'fees_and_limits' => new ValidCompanyGatewayFeesAndLimitsRule(), ]; return $rules; } protected function prepareForValidation() { $input = $this->all(); $input['config'] = encrypt($input['config']); if(isset($input['fees_and_limits'])) $input['fees_and_limits'] = $this->cleanFeesAndLimits($input['fees_and_limits']); $this->replace($input); } }