<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class SponsorNowController extends Controller
{
    //
    public function index()
    {
        $data['header_data'] = getWebSyncsData('Header Settings', 'headerSettings', '');
        $data['sponsorships'] = getSponsorTypes();
        return view ('sponsor-now-services.sponsor_now_types' ,$data);
            
    }
     public function getSponsorServices($serviceType)
	{
        $serviceType = decrypt($serviceType);  
        if (!empty(session('sponsorship_cart')['serviceTypes'])) {
			$session_array = session('sponsorship_cart')['serviceTypes'];
             
			if (session('sponsorship_cart')['serviceTypes']['0'] != $serviceType) {
				session('sponsorship_cart');
			}
		}
        $data['sponsorType_details'] = getSponsorTypes($serviceType);
        $data['header_data'] = getWebSyncsData('Header Settings', 'headerSettings', '');
		$data['serviceType'] = $serviceType;
		return view('sponsor-now-services/sponsor_now_services', $data);
       
    }
}