2FAuth/app/Http/Controllers/SinglePageController.php

40 lines
793 B
PHP
Raw Normal View History

2019-05-28 17:29:15 +02:00
<?php
namespace App\Http\Controllers;
2021-12-01 13:47:20 +01:00
use App\Services\SettingService;
use Illuminate\Support\Facades\App;
2019-05-28 17:29:15 +02:00
class SinglePageController extends Controller
{
/**
* The Settings Service instance.
*/
2021-12-01 13:47:20 +01:00
protected SettingService $settingService;
/**
* Create a new controller instance.
*
*/
2021-12-01 13:47:20 +01:00
public function __construct(SettingService $settingService)
{
2021-12-01 13:47:20 +01:00
$this->settingService = $settingService;
}
2019-05-28 17:29:15 +02:00
/**
* return the main view
* @return view
*/
public function index()
{
2021-12-01 13:47:20 +01:00
return view('landing')->with([
'appSettings' => $this->settingService->all()->toJson(),
'lang' => App::currentLocale(),
'locales' => collect(config("2fauth.locales"))->toJson(),
2021-12-01 13:47:20 +01:00
]);
2019-05-28 17:29:15 +02:00
}
}