Enable disabling internal templates, as well as having custom templates
This commit is contained in:
parent
b3b3fc6ac1
commit
ab33c2dce9
@ -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) {
|
||||
|
@ -94,5 +94,6 @@ return [
|
||||
|
||||
'template' => [
|
||||
'dir' => env('LDAP_TEMPLATE_DRIVER','templates'),
|
||||
'exclude_system' => env('LDAP_TEMPLATE_EXCLUDE_SYSTEM',FALSE),
|
||||
],
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user