src/Traits/HasS3File.php
public function getFileUrl($key, $path = null)
	{
		if (is_null($key)) {
			return null;
		}

		$bucket = config('filesystems.disks.s3.bucket');
		$client = Storage::disk('s3')->getAdapter()->getClient();

		return $this->getRealUrl($client->getObjectUrl($bucket, $path . $key));
	}
public function getFileUrl($key, $path = null)
	{
		if (is_null($key)) {
			return null;
		}

		$bucket = config('filesystems.disks.s3.bucket');
		$client = Storage::disk('s3')->getAdapter()->getClient();

		return $this->getRealUrl($client->getObjectUrl($bucket, $path . $key));
	}
public function getFileUrl ( $ key , $ path = null ) { if ( is_null ( $ key ) ) { return null ; } $ bucket = config ( 'filesystems.disks.s3.bucket' ) ; $ client = Storage :: disk ( 's3' ) -> getAdapter ( ) -> getClient ( ) ; return $ this -> getRealUrl ( $ client -> getObjectUrl ( $ bucket , $ path . $ key ) ) ; }
Retrieve a file URL

@param string      $key
@param null|string $path
@return null|string
Retrieve a file URL