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'));
|
$template_dir = Storage::disk(config('pla.template.dir'));
|
||||||
$templates = collect();
|
$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);
|
$to = new Template($file);
|
||||||
|
|
||||||
if ($to->invalid) {
|
if ($to->invalid) {
|
||||||
|
@ -94,5 +94,6 @@ return [
|
|||||||
|
|
||||||
'template' => [
|
'template' => [
|
||||||
'dir' => env('LDAP_TEMPLATE_DRIVER','templates'),
|
'dir' => env('LDAP_TEMPLATE_DRIVER','templates'),
|
||||||
|
'exclude_system' => env('LDAP_TEMPLATE_EXCLUDE_SYSTEM',FALSE),
|
||||||
],
|
],
|
||||||
];
|
];
|
Loading…
x
Reference in New Issue
Block a user