AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

HomeController.php 1.1KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Models\Plan;
  4. use Inertia\Inertia;
  5. use Inertia\Response;
  6. /**
  7. * Our own home page, the one that sells AI Commerce to merchants. Prices come from the plans table,
  8. * so the page always shows what the Billing page charges.
  9. */
  10. class HomeController extends Controller
  11. {
  12. public function __invoke(): Response
  13. {
  14. return Inertia::render('home', [
  15. 'plans' => Plan::query()->orderBy('sort')->get()->map(fn (Plan $plan) => [
  16. 'key' => $plan->key,
  17. 'name' => $plan->name,
  18. // In ringgit.
  19. 'price' => $plan->price / 100,
  20. 'stores' => $plan->stores,
  21. 'regenerations' => $plan->regenerations,
  22. 'edits' => $plan->edits,
  23. 'period' => $plan->period,
  24. ]),
  25. 'trialDays' => (int) config('plans.trial_days'),
  26. // Stores live at "<name>.<this>", so the hero can show a shop's future address.
  27. 'storeDomain' => config('storefront.domain'),
  28. ]);
  29. }
  30. }