image() public method

Generate an HTML image element.
public image ( string $url, string $alt = null, array $attributes = [], boolean $secure = null ) : Illuminate\Support\HtmlString
$url string
$alt string
$attributes array
$secure boolean
return Illuminate\Support\HtmlString
 /**
  * Return an HTML mailto link.
  *
  * @param null|string $text
  * @return null|string
  */
 public function qr_code()
 {
     if (!($user = $this->object->getEntry())) {
         return null;
     }
     $twofa = new Google2FA();
     $url = $twofa->getQRCodeGoogleUrl('The%20Linden%20Tree', $user->email, $this->object->getValue());
     return $this->html->image($url);
 }
Esempio n. 2
0
 /**
  * Generate an HTML image element.
  *
  * @param string $url
  * @param string $alt
  * @param array $attributes
  * @param bool $secure
  * @return \Illuminate\Support\HtmlString 
  * @static 
  */
 public static function image($url, $alt = null, $attributes = array(), $secure = null)
 {
     return \Collective\Html\HtmlBuilder::image($url, $alt, $attributes, $secure);
 }
Esempio n. 3
0
 /**
  * Generate an HTML image element.
  *
  * @param  string  $url
  * @param  string  $alt
  * @param  array   $attributes
  * @param  bool    $secure
  * @return string
  */
 public function image($url, $alt = null, $attributes = array(), $secure = null)
 {
     return $this->html->image($this->assetUrl($url), $alt, $attributes, $secure);
 }