refactor files
This commit is contained in:
@@ -35,8 +35,9 @@ class FileController extends Controller
|
||||
$templatePath = $request->route("any");
|
||||
$filePath = str_replace($template."/", "", $templatePath);
|
||||
$record = $this->query->filter(["_file.path" => $filePath])->run()->records->first();
|
||||
$schema = $this->channelService->getSchema($record->schema);
|
||||
$this->imageService->file($record,$template);
|
||||
$disk = $this->fileService->loadDisk();
|
||||
$disk = $this->fileService->loadDisk($schema->disk);
|
||||
return response()->file($disk->path("templates/".$templatePath));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user