<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\User;
use Illuminate\Http\Request;
use App\Models\Faculty;
use Artesaos\SEOTools\Facades\SEOTools;
use Artesaos\SEOTools\Facades\SEOMeta;

class TesdaProgramsController extends Controller
{
    public function houseKeeping()
    {
        $title = isset(settings()->site_title) ? settings()->site_title : '';
        $pageTitle = 'House Keeping NCII | ' . $title;
        $description = isset(settings()->site_meta_description) ? settings()->site_meta_description : '';
        $imgURL = isset(settings()->site_logo) ? asset('/images/site/' . settings()->site_logo) : '';
        $keywords = isset(settings()->site_meta_keywords) ? settings()->site_meta_keywords : '';
        $currentUrl = url()->current();
        /** Meta SEO*/
        SEOTools::setTitle($pageTitle, false);
        SEOTools::setDescription($description);
        SEOMeta::setKeywords($keywords);
        /** Open Graph*/
        SEOTools::opengraph()->setUrl($currentUrl);
        SEOTools::opengraph()->addImage($imgURL);
        SEOTools::opengraph()->addProperty('type', 'articles');

        SEOTools::twitter()->addImage($imgURL);
        SEOTools::twitter()->setUrl($currentUrl);
        SEOTools::twitter()->setSite('@larablog');
        $user = User::where('email', 'dhrt@pcds.edu.ph')->first();

        // Get all faculty in the BSIT department
        $facultyMembers = Faculty::where('department', 'Diploma in Hotel and Restaurant Technology')->get();

        $data = [
            'pageTitle' => 'House Keeping NCII | Polytechnic College of Davao del Sur',
            'user' => $user,
            'facultyMembers' => $facultyMembers,
        ];


        return view('front.pages.programs.tesda-programs.tesda-housekeeping', $data);
    }

    public function foodAndBeverages()
    {
        $title = isset(settings()->site_title) ? settings()->site_title : '';
        $pageTitle = 'Food and Beverage Service NC II & NC III | ' . $title;
        $description = isset(settings()->site_meta_description) ? settings()->site_meta_description : '';
        $imgURL = isset(settings()->site_logo) ? asset('/images/site/' . settings()->site_logo) : '';
        $keywords = isset(settings()->site_meta_keywords) ? settings()->site_meta_keywords : '';
        $currentUrl = url()->current();
        /** Meta SEO*/
        SEOTools::setTitle($pageTitle, false);
        SEOTools::setDescription($description);
        SEOMeta::setKeywords($keywords);
        /** Open Graph*/
        SEOTools::opengraph()->setUrl($currentUrl);
        SEOTools::opengraph()->addImage($imgURL);
        SEOTools::opengraph()->addProperty('type', 'articles');

        SEOTools::twitter()->addImage($imgURL);
        SEOTools::twitter()->setUrl($currentUrl);
        SEOTools::twitter()->setSite('@larablog');
        $user = User::where('email', 'dhrt@pcds.edu.ph')->first();

        // Get all faculty in the BSIT department
        $facultyMembers = Faculty::where('department', 'Diploma in Hotel and Restaurant Technology')->get();

        $data = [
            'pageTitle' => 'Food and Beverage Service NCII & NCIII | Polytechnic College of Davao del Sur',
            'user' => $user,
            'facultyMembers' => $facultyMembers,
        ];


        return view('front.pages.programs.tesda-programs.tesda-fnb', $data);
    }


    public function bartending()
    {
        $title = isset(settings()->site_title) ? settings()->site_title : '';
        $pageTitle = 'Bartending NCII | ' . $title;
        $description = isset(settings()->site_meta_description) ? settings()->site_meta_description : '';
        $imgURL = isset(settings()->site_logo) ? asset('/images/site/' . settings()->site_logo) : '';
        $keywords = isset(settings()->site_meta_keywords) ? settings()->site_meta_keywords : '';
        $currentUrl = url()->current();
        /** Meta SEO*/
        SEOTools::setTitle($pageTitle, false);
        SEOTools::setDescription($description);
        SEOMeta::setKeywords($keywords);
        /** Open Graph*/
        SEOTools::opengraph()->setUrl($currentUrl);
        SEOTools::opengraph()->addImage($imgURL);
        SEOTools::opengraph()->addProperty('type', 'articles');

        SEOTools::twitter()->addImage($imgURL);
        SEOTools::twitter()->setUrl($currentUrl);
        SEOTools::twitter()->setSite('@larablog');
        $user = User::where('email', 'dhrt@pcds.edu.ph')->first();

        // Get all faculty in the BSIT department
        $facultyMembers = Faculty::where('department', 'Diploma in Hotel and Restaurant Technology')->get();

        $data = [
            'pageTitle' => 'Bartending | Polytechnic College of Davao del Sur',
            'user' => $user,
            'facultyMembers' => $facultyMembers,
        ];


        return view('front.pages.programs.tesda-programs.tesda-bartending', $data);
    }
    public function frontOffice()
    {
        $title = isset(settings()->site_title) ? settings()->site_title : '';
        $pageTitle = 'Front Office NCII | ' . $title;
        $description = isset(settings()->site_meta_description) ? settings()->site_meta_description : '';
        $imgURL = isset(settings()->site_logo) ? asset('/images/site/' . settings()->site_logo) : '';
        $keywords = isset(settings()->site_meta_keywords) ? settings()->site_meta_keywords : '';
        $currentUrl = url()->current();
        /** Meta SEO*/
        SEOTools::setTitle($pageTitle, false);
        SEOTools::setDescription($description);
        SEOMeta::setKeywords($keywords);
        /** Open Graph*/
        SEOTools::opengraph()->setUrl($currentUrl);
        SEOTools::opengraph()->addImage($imgURL);
        SEOTools::opengraph()->addProperty('type', 'articles');

        SEOTools::twitter()->addImage($imgURL);
        SEOTools::twitter()->setUrl($currentUrl);
        SEOTools::twitter()->setSite('@larablog');
        $user = User::where('email', 'dhrt@pcds.edu.ph')->first();

        // Get all faculty in the BSIT department
        $facultyMembers = Faculty::where('department', 'Diploma in Hotel and Restaurant Technology')->get();

        $data = [
            'pageTitle' => 'Front Office | Polytechnic College of Davao del Sur',
            'user' => $user,
            'facultyMembers' => $facultyMembers,
        ];


        return view('front.pages.programs.tesda-programs.tesda-front-office', $data);
    }
    public function automotiveServicing()
    {
        $title = isset(settings()->site_title) ? settings()->site_title : '';
        $pageTitle = 'Automotive Servicing NCII | ' . $title;
        $description = isset(settings()->site_meta_description) ? settings()->site_meta_description : '';
        $imgURL = isset(settings()->site_logo) ? asset('/images/site/' . settings()->site_logo) : '';
        $keywords = isset(settings()->site_meta_keywords) ? settings()->site_meta_keywords : '';
        $currentUrl = url()->current();
        /** Meta SEO*/
        SEOTools::setTitle($pageTitle, false);
        SEOTools::setDescription($description);
        SEOMeta::setKeywords($keywords);
        /** Open Graph*/
        SEOTools::opengraph()->setUrl($currentUrl);
        SEOTools::opengraph()->addImage($imgURL);
        SEOTools::opengraph()->addProperty('type', 'articles');

        SEOTools::twitter()->addImage($imgURL);
        SEOTools::twitter()->setUrl($currentUrl);
        SEOTools::twitter()->setSite('@larablog');
        $user = User::where('email', 'dhrt@pcds.edu.ph')->first();

        // Get all faculty in the BSIT department
        $facultyMembers = Faculty::where('department', 'Diploma in Hotel and Restaurant Technology')->get();

        $data = [
            'pageTitle' => 'Automotive Servicing NCII | Polytechnic College of Davao del Sur',
            'user' => $user,
            'facultyMembers' => $facultyMembers,
        ];


        return view('front.pages.programs.tesda-programs.tesda-automotive-servicing', $data);
    }
    public function shieldedMetalArcWelding()
    {
        $title = isset(settings()->site_title) ? settings()->site_title : '';
        $pageTitle = 'Shielded Metal Arc Welding NCII | ' . $title;
        $description = isset(settings()->site_meta_description) ? settings()->site_meta_description : '';
        $imgURL = isset(settings()->site_logo) ? asset('/images/site/' . settings()->site_logo) : '';
        $keywords = isset(settings()->site_meta_keywords) ? settings()->site_meta_keywords : '';
        $currentUrl = url()->current();
        /** Meta SEO*/
        SEOTools::setTitle($pageTitle, false);
        SEOTools::setDescription($description);
        SEOMeta::setKeywords($keywords);
        /** Open Graph*/
        SEOTools::opengraph()->setUrl($currentUrl);
        SEOTools::opengraph()->addImage($imgURL);
        SEOTools::opengraph()->addProperty('type', 'articles');

        SEOTools::twitter()->addImage($imgURL);
        SEOTools::twitter()->setUrl($currentUrl);
        SEOTools::twitter()->setSite('@larablog');
        $user = User::where('email', 'dhrt@pcds.edu.ph')->first();

        // Get all faculty in the BSIT department
        $facultyMembers = Faculty::where('department', 'Diploma in Hotel and Restaurant Technology')->get();

        $data = [
            'pageTitle' => 'Shielded Metal Arc Welding NCII | Polytechnic College of Davao del Sur',
            'user' => $user,
            'facultyMembers' => $facultyMembers,
        ];


        return view('front.pages.programs.tesda-programs.tesda-shielded-metal-arc-welding', $data);
    }
}
