src/Concerns/Paths.php
public function getUrlAttribute()
    {
        if ($this->disk == 'public') {
            return url($this->storage->url($this->path));
        }

        return config('media.download', false) ? url(str_finish(config('media.download'), '/') . $this->id) : null;
    }
public function getUrlAttribute()
    {
        if ($this->disk == 'public') {
            return url($this->storage->url($this->path));
        }

        return config('media.download', false) ? url(str_finish(config('media.download'), '/') . $this->id) : null;
    }
public function getUrlAttribute ( ) { if ( $ this -> disk == 'public' ) { return url ( $ this -> storage -> url ( $ this -> path ) ) ; } return config ( 'media.download' , false ) ? url ( str_finish ( config ( 'media.download' ) , '/' ) . $ this -> id ) : null ; }
Url to file.

@return string|null
Url to file .