Esempio n. 1
0
 /**
  * Get the assets domain
  *
  * @var string
  * @return string
  */
 public function url($file = NULL)
 {
     $asset = new Asset($this->config);
     if (!is_null($file)) {
         $asset->setFile($file);
     }
     return $asset->url();
 }
Esempio n. 2
0
 public function __construct(\Illuminate\Config\Repository $config, \Crobays\Asset\Image\ImageUrl $img_url)
 {
     parent::__construct($config);
     // Set the default source attr and if not exist default to src for upgrading users
     $this->setSourceAttribute($this->config->get('asset::default-src-attr') ?: 'src');
     $this->addDefaultClasses();
     $this->image_url = $img_url;
     $this->image_url->setBaseUrl($this->config->get('asset::url'));
     $this->image_url->setRootPath($this->config->get('asset::root-path'));
     $this->image_url->setFileArgumentsSeperator($this->config->get('asset::file-arguments-seperator'));
     $this->image_url->setArgumentSeperator($this->config->get('asset::argument-seperator'));
     $this->image_url->setSourceDir($this->config->get('asset::images-directories.' . $this->type . '.source'));
     $this->image_url->setUriDir($this->config->get('asset::images-directories.' . $this->type . '.uri'));
 }