<?php

namespace App\Http\Controllers;
use App\Models\Faculty;
use Illuminate\Foundation\Auth\User;
use Illuminate\Http\Request;
use Artesaos\SEOTools\Facades\SEOTools;
use Artesaos\SEOTools\Facades\SEOMeta;
class ProgramsController extends Controller
{
    
   public function bsInformationTechnology(){
    $title = isset(settings()->site_title) ? settings()->site_title : '';
    $pageTitle = 'Bachelor of Science in Information Technology | '.$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', 'bsit@pcds.edu.ph')->first();

    // Get all faculty in the BSIT department
    $facultyMembers = Faculty::where('department', 'Bachelor of Science in Information Technology')->get();

    $data = [
        'pageTitle' => 'Bachelor of Science in Information Technology | Polytechnic College of Davao del Sur',
        'user' => $user,
        'facultyMembers' => $facultyMembers,
    ];

    return view('front.pages.programs.bs-information-technology', $data);
   }
   public function bsCriminology(){
    $title = isset(settings()->site_title) ? settings()->site_title : '';
    $pageTitle = 'Bachelor of Science in Criminology | '.$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', 'bsc@pcds.edu.ph')->first();

    // Get all faculty in the BSIT department
    $facultyMembers = Faculty::where('department', 'Bachelor of Science in Criminology')->get();

    $data = [
        'pageTitle' => 'Bachelor of Science in Criminology | Polytechnic College of Davao del Sur',
        'user' => $user,
        'facultyMembers' => $facultyMembers,
    ];

    return view('front.pages.programs.bs-criminology', $data);
   }
   public function bsHospitalityManagement(){
    $title = isset(settings()->site_title) ? settings()->site_title : '';
    $pageTitle = 'Bachelor of Science in Hospitality Management | '.$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', 'bshm@pcds.edu.ph')->first();

    // Get all faculty in the BSIT department
    $facultyMembers = Faculty::where('department', 'Bachelor of Science in Hospitality Management')->get();

    $data = [
        'pageTitle' => 'Bachelor of Science in Hospitality Management | Polytechnic College of Davao del Sur',
        'user' => $user,
        'facultyMembers' => $facultyMembers,
    ];

    return view('front.pages.programs.bs-hospitality-management', $data);
   }
   public function bsNursing(){
    $title = isset(settings()->site_title) ? settings()->site_title : '';
    $pageTitle = 'Bachelor of Science in Nursing | '.$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', 'bsn@pcds.edu.ph')->first();

    // Get all faculty in the BSIT department
    $facultyMembers = Faculty::where('department', 'Bachelor of Science in Nursing')->get();

    $data = [
        'pageTitle' => 'Bachelor of Science in Nursing | Polytechnic College of Davao del Sur',
        'user' => $user,
        'facultyMembers' => $facultyMembers,
    ];

    return view('front.pages.programs.bs-nursing', $data);
   }
   public function bsRadiologicTechnology(){
    $title = isset(settings()->site_title) ? settings()->site_title : '';
    $pageTitle = 'Bachelor of Science in Radiologic Technology | '.$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', 'bsrt@pcds.edu.ph')->first();

    // Get all faculty in the BSIT department
    $facultyMembers = Faculty::where('department', 'Bachelor of Science in Radiologic Technology')->get();

    $data = [
        'pageTitle' => 'Bachelor of Science in Radiologic Technology | Polytechnic College of Davao del Sur',
        'user' => $user,
        'facultyMembers' => $facultyMembers,
    ];

    return view('front.pages.programs.bs-radiologic-technology', $data);
   }
   public function dHotelRestaurantTechnology(){
    $title = isset(settings()->site_title) ? settings()->site_title : '';
    $pageTitle = 'Diploma in Hotel and Restaurant Technology | '.$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' => 'Diploma in Hotel and Restaurant Technology | Polytechnic College of Davao del Sur',
        'user' => $user,
        'facultyMembers' => $facultyMembers,
    ];

    return view('front.pages.programs.d-hotel-restaurant-technology', $data);
   }
}
