<?php

namespace App\Http\Controllers;

use App\Models\Order;
use App\Models\Product;
use App\Models\Merchant;
use Illuminate\View\View;

class HomeController extends Controller
{
    public function index(): View
    {
        return view('home', [
            'merchantCount' => Merchant::count(),
            'productCount' => Product::count(),
            'orderCount' => Order::count(),
            'platforms' => [
                ['name' => 'PC 端', 'path' => '/pc', 'status' => 'ready'],
                ['name' => 'H5', 'path' => '/h5', 'status' => 'ready'],
                ['name' => '微信公众号', 'path' => '/wechat/mp', 'status' => 'reserved'],
                ['name' => '微信小程序', 'path' => '/wechat/mini', 'status' => 'reserved'],
                ['name' => 'APP 接口层', 'path' => '/api/v1/platforms', 'status' => 'reserved'],
            ],
        ]);
    }
}
