SinglePageController.php 700 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Services\SettingService;
  4. class SinglePageController extends Controller
  5. {
  6. /**
  7. * The Settings Service instance.
  8. */
  9. protected SettingService $settingService;
  10. /**
  11. * Create a new controller instance.
  12. *
  13. */
  14. public function __construct(SettingService $settingService)
  15. {
  16. $this->settingService = $settingService;
  17. }
  18. /**
  19. * return the main view
  20. * @return view
  21. */
  22. public function index()
  23. {
  24. return view('landing')->with([
  25. 'appSettings' => $this->settingService->all()->toJson(),
  26. 'lang' => $this->settingService->get('lang')
  27. ]);
  28. }
  29. }