mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-09 14:34:47 +00:00
Move Mail, PDF configuration to Database, standardize configurations
This commit is contained in:
@@ -18,15 +18,15 @@ class ConfigMiddleware
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (InstallUtils::isDbCreated()) {
|
||||
// Only handle dynamic file disk switching when file_disk_id is provided
|
||||
if ($request->has('file_disk_id')) {
|
||||
$file_disk = FileDisk::find($request->file_disk_id);
|
||||
} else {
|
||||
$file_disk = FileDisk::whereSetAsDefault(true)->first();
|
||||
}
|
||||
|
||||
if ($file_disk) {
|
||||
$file_disk->setConfig();
|
||||
if ($file_disk) {
|
||||
$file_disk->setConfig();
|
||||
}
|
||||
}
|
||||
// Default file disk is now handled by AppConfigProvider during boot
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
||||
Reference in New Issue
Block a user