configurable disks
This commit is contained in:
+12
-2
@@ -25,8 +25,18 @@ final class Channel
|
||||
)
|
||||
{
|
||||
$this->lucentUrl = $url . "/lucent";
|
||||
$this->filesUrl = $url . "/storage";
|
||||
$this->previewTargetUrl = $url . "/". $previewTarget;
|
||||
$this->filesUrl = $this->makeFilesUrl();
|
||||
$this->previewTargetUrl = $url . "/" . $previewTarget;
|
||||
}
|
||||
|
||||
|
||||
private function makeFilesUrl(): string
|
||||
{
|
||||
return match (config("filesystems.disks.lucent.driver")) {
|
||||
"s3" => config("filesystems.disks.lucent.endpoint") . "/" . config("filesystems.disks.lucent.bucket"),
|
||||
"local" => $this->url . "/storage" . config("filesystems.disks.lucent.endpoint"),
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Lucent\Channel;
|
||||
|
||||
|
||||
use Lucent\File\FileService;
|
||||
use Lucent\Primitive\Collection;
|
||||
use Lucent\Schema\Schema;
|
||||
use Lucent\Schema\SchemaService;
|
||||
@@ -13,7 +14,7 @@ final class ChannelService
|
||||
public Channel $channel;
|
||||
|
||||
private function __construct(
|
||||
public SchemaService $schemaService
|
||||
public SchemaService $schemaService,
|
||||
)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user