<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\Ad;

class AdApiController extends Controller
{
    // POST /api/ads/{ad}/impression
    public function impression(Ad $ad)
    {
        $ad->increment('impressions');
        return response()->json(['ok' => true]);
    }

    // POST /api/ads/{ad}/click
    public function click(Ad $ad)
    {
        $ad->increment('clicks');
        return response()->json(['ok' => true]);
    }
}
