fix paths

This commit is contained in:
2026-05-07 21:18:50 +03:00
parent 639ee895cd
commit 48e32bfdcb
12 changed files with 74 additions and 51 deletions
+5 -3
View File
@@ -34,14 +34,16 @@ final class Channel
private function makeFilesUrl(): string
{
$lucentDisk = config("lucent.disk");
$lucentDisk = config("lucent.public_disk");
return match (config("filesystems.disks.$lucentDisk.driver")) {
"s3" => config("filesystems.disks.$lucentDisk.endpoint") .
"/" .
"/lucent" .
config("filesystems.disks.$lucentDisk.bucket"),
"local" => $this->url .
"/storage" .
"/storage/lucent" .
config("filesystems.disks.$lucentDisk.endpoint"),
default => "",
};
}
+4 -2
View File
@@ -4,6 +4,7 @@ namespace Lucent\Channel;
use Lucent\Channel\Data\UserCommand;
use Lucent\Data\ChannelAuth;
use Lucent\File\FileService;
use Lucent\Primitive\Collection;
use Lucent\Data\Schema;
use Lucent\Schema\SchemaService;
@@ -18,8 +19,9 @@ final class ChannelService
public static function fromConfig(): ChannelService
{
$schemasArray = [];
if (file_exists(schemas_path())) {
$schemasJson = file_get_contents(schemas_path());
$privateDisk = FileService::loadPrivateDisk();
if ($privateDisk->exists(schemas_path())) {
$schemasJson = $privateDisk->get(schemas_path());
$schemasArray = json_decode($schemasJson, true);
}
$schemaService = new SchemaService();