SinglePageController.php 938 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Facades\Settings;
  4. use Illuminate\Support\Facades\App;
  5. class SinglePageController extends Controller
  6. {
  7. /**
  8. * return the main view
  9. * @return view
  10. */
  11. public function index()
  12. {
  13. return view('landing')->with([
  14. 'appSettings' => Settings::all()->toJson(),
  15. 'appConfig' => collect([
  16. 'proxyAuth' => config("auth.defaults.guard") === 'reverse-proxy-guard' ? true : false,
  17. 'proxyLogoutUrl' => config("2fauth.config.proxyLogoutUrl") ? config("2fauth.config.proxyLogoutUrl") : false,
  18. ])->toJson(),
  19. 'lang' => App::currentLocale(),
  20. 'isDemoApp' => config("2fauth.config.isDemoApp") ? 'true' : 'false',
  21. 'isTestingApp' => config("2fauth.config.isTestingApp") ? 'true' : 'false',
  22. 'locales' => collect(config("2fauth.locales"))->toJson()
  23. ]);
  24. }
  25. }