<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Widgets;
use App\Pages;

class PrivacyPolicyController extends Controller
{
     public function __construct()
     {

     }

     public function index()
     {
          $key = "privacy_policy";
          $data["model"] = Pages::where('AccessURL', $key)->where('Status', 'Enabled')->first();
          if ($data["model"]->IsPermanentRedirect == "Yes" && !empty($data["model"]->PermanentRedirectURL)) {
               return redirect($data["model"]->PermanentRedirectURL);
          }
          $data["sec2"] = Widgets::where('code', 'index_sec_5')->first();
          $data["sec3"] = Widgets::where('code', 'index_sec_7')->first();
          $data["sec4"] = Widgets::where('code', 'index_sec_6')->first();
          $data["headerClass"] = 'no-banner';

          return view('front/privacy', $data);
     }
}