public function addFormMacro() { app('form')->macro('captcha', function ($options = array()) { $image = \Illuminate\Support\Facades\HTML::image(Captcha::img(), 'Captcha Image'); $label = "<label for=\"captcha\">Enter the Captcha</label> "; $input = "<input type=\"text\" name=\"captcha\" id=\"captcha\" autcomplete=\"off\" required/>"; return $image . $label . $input; }); }
/** * * * @param null $config * @return string * @static */ public static function img($config = null) { return \Mews\Captcha\Captcha::img($config); }