SinglePageController.php 661 B

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