<?php

namespace App\Http\Controllers\Front;

use App\Http\Controllers\Controller;

use Exception;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
use Yajra\DataTables\Facades\DataTables;
use Illuminate\Http\JsonResponse;
use App\Models\Page;
class AboutusController extends Controller
{
    public function index()
    {
      $page_tittle = 'About Us';
      $headerimage = asset('front/assets/images/page-header-default.jpg');
      $page = Page::find(1);
      if($page->banner_image !=''){
        $headerimage = asset('storage/sliders/'.$page->banner_image);
      }
        
        return view('front.about', compact('page_tittle','headerimage','page'));

    }

    public function privacypolicy()
    {
      $page_tittle = 'Privacy Policy';
      $headerimage = asset('front/assets/images/page-header-default.jpg');
      $page = Page::find(3);
      
      if($page->banner_image !=''){
        $headerimage = asset('storage/sliders/'.$page->banner_image);
      }
        
        return view('front.privacypolicy', compact('page_tittle','headerimage','page'));

    }

    public function termofuse()
    {
      $page_tittle = 'Terms of Use';
      $headerimage = asset('front/assets/images/page-header-default.jpg');
      $page = Page::find(3);
      
      if($page->banner_image !=''){
        $headerimage = asset('storage/sliders/'.$page->banner_image);
      }
        
        return view('front.termofuse', compact('page_tittle','headerimage','page'));

    }
   
}
