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;
|
2019-05-28 17:29:15 +02:00
|
|
|
|
|
|
|
class SinglePageController extends Controller
|
|
|
|
{
|
|
|
|
|
2021-09-26 22:06:49 +02:00
|
|
|
/**
|
|
|
|
* The Settings Service instance.
|
|
|
|
*/
|
2021-12-01 13:47:20 +01:00
|
|
|
protected SettingService $settingService;
|
2021-09-26 22:06:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new controller instance.
|
|
|
|
*
|
|
|
|
*/
|
2021-12-01 13:47:20 +01:00
|
|
|
public function __construct(SettingService $settingService)
|
2021-09-26 22:06:49 +02:00
|
|
|
{
|
2021-12-01 13:47:20 +01:00
|
|
|
$this->settingService = $settingService;
|
2021-09-26 22:06:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
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' => $this->settingService->get('lang')
|
|
|
|
]);
|
2019-05-28 17:29:15 +02:00
|
|
|
}
|
|
|
|
}
|