<?php

namespace App\Http\Controllers;

use App\Models\WebsitePageLeads;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class WebsitePageLeadsController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    
     public function index() {
    
        $data["GoogleAdsLeads"] = DB::table('digitaladsleads')
        ->select("*")
        ->whereIN('ChannelSource', ['FacebookPage','WebSitePage','YoutubePage','BlogPage'])
        ->get();
        $data4 = $data["GoogleAdsLeads"];
        // echo "<pre>";
        //print_r($data);
        $array = json_decode(json_encode($data4), true);
        return view("layouts.WebsitePageLeads",["websitepageLeads"=>$array]);
        
    }

    /**
    
    * 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\WebsitePageLeads  $websitePageLeads
     * @return \Illuminate\Http\Response
     */
    public function show(WebsitePageLeads $websitePageLeads)
    {
        //
    }

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

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

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