<?php

namespace App\Http\Controllers;

use App\Models\FacebookPageLeads;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class FacebookPageLeadsController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $data["GoogleAdsLeads"] = DB::table('digitaladsleads')
        ->select("*")
        ->where('ChannelSource', 'FacebookPage')
        ->get();

        $data4 = $data["GoogleAdsLeads"];
        $array = json_decode(json_encode($data4), true);
        return view("layouts.FacebookPageLeads",["FacebookPageLeads"=>$array]);

        return view("layouts.FacebookPageLeads");
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Models\FacebookPageLeads  $facebookPageLeads
     * @return \Illuminate\Http\Response
     */
    public function show(FacebookPageLeads $facebookPageLeads)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Models\FacebookPageLeads  $facebookPageLeads
     * @return \Illuminate\Http\Response
     */
    public function edit(FacebookPageLeads $facebookPageLeads)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\FacebookPageLeads  $facebookPageLeads
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, FacebookPageLeads $facebookPageLeads)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\FacebookPageLeads  $facebookPageLeads
     * @return \Illuminate\Http\Response
     */
    public function destroy(FacebookPageLeads $facebookPageLeads)
    {
        //
    }
}
