diff --git a/routes/web.php b/routes/web.php index 4d899ef..859f102 100644 --- a/routes/web.php +++ b/routes/web.php @@ -43,7 +43,10 @@ set_time_limit(0); ini_set('memory_limit', '256M'); - $dbPath = database_path('database.sqlite'); + $dbRaw = config('database.connections.sqlite.database', 'database/database.sqlite'); + $dbPath = str_starts_with($dbRaw, '/') || preg_match('/^[A-Za-z]:/', $dbRaw) + ? $dbRaw + : base_path($dbRaw); if (! file_exists($dbPath)) { abort(404, 'Database not found.'); }