<?php

namespace App\Http\Controllers\FrontEnd;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class ProductController extends Controller
{
    public function productPage(Request $request)
    {
        $product = sendRequest('post', 'http://panel.filmaa.ir/api/getproduct.json', [
            'product' => $request->id,
        ],0);
        $product = $product['product'];
        //dd($product);

        return view('frontend.product', compact('product'));
    }

    public function productPlayer(Request $request)
    {
        $product = sendRequest('post', 'http://panel.filmaa.ir/api/getproduct.json', [
            'product' => $request->id,
        ],100);
        $product = $product['product'];
        //dd($product);
        return view('frontend.player',compact('product'));
    }
}
