Add a button to go back to the v1 layout.

This commit is contained in:
James Cole
2024-03-05 19:38:45 +01:00
parent a5b15bbc16
commit 3a339382d4
8 changed files with 64 additions and 67 deletions

View File

@@ -69,6 +69,11 @@ abstract class Controller extends BaseController
$authGuard = config('firefly.authentication_guard');
$logoutUrl = config('firefly.custom_logout_url');
// overrule v2 layout back to v1.
if ('true' === request()->get('force_default_layout') && 'v2' === config('firefly.layout')) {
app('view')->getFinder()->setPaths([realpath(base_path('resources/views'))]);
}
app('view')->share('authGuard', $authGuard);
app('view')->share('logoutUrl', $logoutUrl);