mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
Merge remote-tracking branch 'origin/master' into oasis
# Conflicts: # .php-cs-fixer.cache # app/Http/helpers.php # app/Services/FileManagerService.php # composer.lock # public/chunks/environment-setup.js # public/chunks/files~chunks/shared/file-browser.js # public/js/main.js # public/mix-manifest.json
This commit is contained in:
@@ -14,8 +14,11 @@ use Illuminate\Support\Facades\Mail;
|
||||
use App\Http\Mail\SendContactMessage;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Doctrine\DBAL\Driver\PDOException;
|
||||
use Illuminate\Database\QueryException;
|
||||
use App\Http\Resources\PricingCollection;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use App\Http\Requests\PublicPages\SendContactMessageRequest;
|
||||
|
||||
class AppFunctionsController extends Controller
|
||||
@@ -178,18 +181,22 @@ class AppFunctionsController extends Controller
|
||||
|
||||
/**
|
||||
* Get language translations for frontend app
|
||||
*
|
||||
* @param $lang
|
||||
* @return array
|
||||
*/
|
||||
public function get_translations($lang)
|
||||
{
|
||||
$translations = Cache::rememberForever("language-translations-$lang", function () use ($lang) {
|
||||
return Language::whereLocale($lang)
|
||||
->firstOrFail()
|
||||
->languageTranslations;
|
||||
});
|
||||
$translations = cache()
|
||||
->rememberForever("language-translations-$lang", function () use ($lang) {
|
||||
try {
|
||||
return Language::whereLocale($lang)
|
||||
->firstOrFail()
|
||||
->languageTranslations;
|
||||
} catch (QueryException | ModelNotFoundException $e) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
return map_language_translations($translations);
|
||||
return $translations
|
||||
? map_language_translations($translations)
|
||||
: get_default_language_translations();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,6 +283,14 @@ class SetupWizardController extends Controller
|
||||
'BACKBLAZE_REGION' => $request->storage['region'] ?? null,
|
||||
'BACKBLAZE_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
'oss' => [
|
||||
'FILESYSTEM_DRIVER' => $request->storage['driver'] ?? null,
|
||||
'OSS_ACCESS_KEY_ID' => $request->storage['key'] ?? null,
|
||||
'OSS_SECRET_ACCESS_KEY' => $request->storage['secret'] ?? null,
|
||||
'OSS_ENDPOINT' => $request->storage['endpoint'] ?? null,
|
||||
'OSS_REGION' => $request->storage['region'] ?? null,
|
||||
'OSS_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
];
|
||||
|
||||
// Storage credentials for storage
|
||||
|
||||
Reference in New Issue
Block a user