Enable disabling internal templates, as well as having custom templates

This commit is contained in:
2025-06-21 09:51:03 +10:00
parent e8aaa17122
commit f6b7bff605
2 changed files with 5 additions and 1 deletions

View File

@@ -53,7 +53,10 @@ class Entry extends Model
$template_dir = Storage::disk(config('pla.template.dir'));
$templates = collect();
foreach (array_filter($template_dir->files(),fn($item)=>Str::endsWith($item,'.json')) as $file) {
foreach (array_filter($template_dir->files('.',TRUE),fn($item)=>Str::endsWith($item,'.json')) as $file) {
if (config('pla.template.exclude_system',FALSE) && Str::doesntContain($file,'/'))
continue;
$to = new Template($file);
if ($to->invalid) {