diff --git a/src/GoogleReCaptchaV3.php b/src/GoogleReCaptchaV3.php index 1433c2a..2c9adf3 100644 --- a/src/GoogleReCaptchaV3.php +++ b/src/GoogleReCaptchaV3.php @@ -76,7 +76,7 @@ public function prepareBackgroundViewData() */ public function init() { - if (!$this->getConfig()->isServiceEnabled()) { + if (! $this->getConfig()->isServiceEnabled()) { return; } $default = [ @@ -97,7 +97,6 @@ public function renderOne($id, $action) self::$collection[$id] = $action; } - /** * @param $id * @param $action @@ -105,14 +104,14 @@ public function renderOne($id, $action) * @param string $style * @return \Illuminate\Contracts\View\View|mixed */ - public function renderField($id, $action, $class,$style = '') + public function renderField($id, $action, $class, $style = '') { self::$hasAction = true; self::$collection[$id] = $action; + return app('view')->make($this->getFieldView(), ['id' => $id, 'class'=>$class, 'style' => $style]); } - /** * @param $mappers */ @@ -132,7 +131,6 @@ protected function getView() return $this->defaultTemplate; } - /** * @return mixed|string */