/** * Gets the public url for the file * @param ModelCore The subject model * @param string $column The column name * @return string */ public function getPublicUrl(ModelCore $model = NULL, $column = '') { $url = ''; $filename = ''; if ($model) { $filename = $model->getAttributes()[$column]; $this->column = $column; } elseif ($this->subjectModel) { $filename = $this->subjectModel->{$this->column}; } if (!$filename) { return $url; } $configPath = $this->getConfigPath($model); $url = request()->root() . '/images/' . $configPath . '/' . $filename; return $url; }