Collective\Html\FormBuilder::image PHP Method

image() public method

Create a HTML image input element.
public image ( string $url, string $name = null, array $attributes = [] ) : Illuminate\Support\HtmlString
$url string
$name string
$attributes array
return Illuminate\Support\HtmlString
    public function image($url, $name = null, $attributes = [])
    {
        $attributes['src'] = $this->url->asset($url);
        return $this->input('image', $name, null, $attributes);
    }

Usage Example

 /**
  * Create a HTML image input element.
  *
  * @param string $url
  * @param string $name
  * @param array $attributes
  * @return string 
  * @static 
  */
 public static function image($url, $name = null, $attributes = array())
 {
     return \Collective\Html\FormBuilder::image($url, $name, $attributes);
 }