<?php

namespace App\Http\Controllers\Api;

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

class ShareController extends Controller
{
    /** Record a share event (public — no auth required). */
    public function store(Video $video)
    {
        $video->increment('shares');

        return response()->json(['shares' => $video->displayShares()]);
    }
}
