<?php

namespace App\Http\Controllers\FrontEnd;


use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Cookie;

class HomePageController extends Controller
{
    public function homePage()
    {
        $sections = sendRequest('post','http://panel.filmaa.ir/api/gethome.json',[],10);
        $sections = $sections['sections'];
        //dd($sections);
        $sections = array_filter($sections, function ($value) {

            if (count($value['list']) > 0) {
                return true;
            }
        });
        $sections = array_values($sections);
        //dd($sections);
        return view('frontend.home',compact('sections'));

    }
}
