SinglePageController.php 725 B

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