2019-05-28 17:29:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2022-07-30 17:51:02 +02:00
|
|
|
use App\Facades\Settings;
|
2021-12-03 22:50:28 +01:00
|
|
|
use Illuminate\Support\Facades\App;
|
2019-05-28 17:29:15 +02:00
|
|
|
|
|
|
|
class SinglePageController extends Controller
|
|
|
|
{
|
|
|
|
|
2021-09-26 22:06:49 +02:00
|
|
|
|
2019-05-28 17:29:15 +02:00
|
|
|
/**
|
|
|
|
* return the main view
|
2022-08-26 15:57:18 +02:00
|
|
|
* @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory
|
2019-05-28 17:29:15 +02:00
|
|
|
*/
|
|
|
|
public function index()
|
|
|
|
{
|
2021-12-01 13:47:20 +01:00
|
|
|
return view('landing')->with([
|
2022-07-30 17:51:02 +02:00
|
|
|
'appSettings' => Settings::all()->toJson(),
|
2022-05-16 22:55:50 +02:00
|
|
|
'appConfig' => collect([
|
|
|
|
'proxyAuth' => config("auth.defaults.guard") === 'reverse-proxy-guard' ? true : false,
|
|
|
|
'proxyLogoutUrl' => config("2fauth.config.proxyLogoutUrl") ? config("2fauth.config.proxyLogoutUrl") : false,
|
|
|
|
])->toJson(),
|
2021-12-03 22:50:28 +01:00
|
|
|
'lang' => App::currentLocale(),
|
2022-05-10 08:57:45 +02:00
|
|
|
'isDemoApp' => config("2fauth.config.isDemoApp") ? 'true' : 'false',
|
2022-07-07 16:39:57 +02:00
|
|
|
'isTestingApp' => config("2fauth.config.isTestingApp") ? 'true' : 'false',
|
2022-05-16 22:55:50 +02:00
|
|
|
'locales' => collect(config("2fauth.locales"))->toJson()
|
2021-12-01 13:47:20 +01:00
|
|
|
]);
|
2019-05-28 17:29:15 +02:00
|
|
|
}
|
|
|
|
}
|