initDB(); } //CONSULTANCY RELATED TEMP FUNCTIONS public static function getFAQs() { $Rows = DB::table("faqs") ->where("status", 1) ->orderBy("display_order")->get(); return $Rows; } public static function getServices() { $Rows = DB::table("services") ->where("status", 1) ->orderBy("display_order")->get(); return $Rows; } public static function getSliders() { $Rows = DB::table("sliders") ->where("status", 1) ->orderBy("display_order")->get(); return $Rows; } public static function getAbout() { $Rows = DB::table("articles") ->where("status", 1) ->where("parent_article", 0) ->orderBy("display_order")->get(); return $Rows; } public static function getArticlesByParentAlias($alias) { $Rows = DB::table("articles") ->where("status", 1) ->where("parent_article", function ($query) use ($alias) { $query->select('article_id') ->from('articles') ->where('alias', $alias); }) ->orderBy("display_order") ->get(); return $Rows; } public static function getArticleByAlias($alias) { $article = DB::table("articles") ->where("status", 1) ->where("alias", $alias) ->first(); return $article; } public static function getAllHeaderMenuItemsWithChildren() { $menuLocation = Menulocations::where('alias', 'main-menu')->where('status', 1)->first(); $headerMenuItems = MenuItems::where('parent_menu', 0)->where('menulocations_id', $menuLocation->menulocation_id)->with('children', function ($query) { $query->orderBy('display_order', 'asc'); })->orderBy('display_order', 'asc')->get(); return $headerMenuItems; } public static function getAllFooterMenuItemsWithChildren() { $menuLocation = Menulocations::where('alias', 'footer-menu')->where('status', 1)->first(); $footerMenuItems = MenuItems::where('parent_menu', 0)->where('menulocations_id', $menuLocation->menulocation_id)->with('children', function ($query) { $query->orderBy('display_order', 'asc'); })->orderBy('display_order', 'asc')->get(); return $footerMenuItems; } public static function getContacts($index = -1) { $Rows = DB::table("contacts")->where("status", 1)->orderBy("display_order")->get(); if ($index != -1) { return $Rows[$index]; } return $Rows; } public static function getCareersList() { return Preparationclasses::where('alias', 'careers')->where('status', 1)->with('children')->first(); } public static function getSkillsList() { return Preparationclasses::where('alias', 'skills')->where('status', 1)->with('children')->first(); } public static function getContactByBranch($branches_id) { $Rows = DB::table("contacts")->where("status", 1)->where("branches_id", $branches_id)->orderBy("display_order")->first(); return $Rows; } public static function getQuickLinks() { $Rows = DB::table("quicklinks")->where("status", 1)->orderBy("display_order")->get(); return $Rows; } public static function getBranches() { $Rows = DB::table("branches")->where("status", 1)->orderBy("display_order")->get(); return $Rows; } public static function getBranchByID($branches_id) { $Row = DB::table("branches")->where("status", 1)->where("branch_id", $branches_id)->orderBy("display_order")->first(); return $Row; } public static function getStudyAbroad($limit = null) { $Rows = DB::table("countries") ->where("status", 1) ->orderBy("display_order"); if ($limit !== null) { $Rows->limit($limit); } $Rows = $Rows->get(); return $Rows; } public static function getTestPreparations($limit = null) { $row = Preparationclasses::where('alias', 'courses') ->where("parent_preparationclass", 0) ->where("status", 1) ->with('children') ->orderBy("display_order") ->first(); return $row; } public static function getResources() { $Rows = DB::table("resources") ->where("status", 1) ->where("parent_resource", 0) ->orderBy("display_order")->get(); return $Rows; } public static function getEvents() { $Rows = DB::table("events") ->where("status", 1) ->orderBy("display_order")->get(); return $Rows; } public static function getNews() { $Rows = DB::table("news") ->where("status", 1) ->orderBy("display_order")->get(); return $Rows; } public static function getTestimonials() { $Rows = DB::table("testimonials")->where("status", 1)->orderBy("display_order")->get(); return $Rows; } public static function getTestimonialsByBranchAlias($alias) { $Branch = DB::table("branches")->where("alias", $alias)->first(); if ($Branch) { $Rows = DB::table("testimonials") ->where("status", 1) ->where("branches_id", $Branch->branch_id) ->orderBy("display_order")->get(); return $Rows; } else { die("Branch not found"); } } public static function getVisas() { $Rows = DB::table("visas")->where("status", 1)->orderBy("display_order")->get(); return $Rows; } public static function getVisasByBranchAlias($alias) { $Branch = DB::table("branches")->where("alias", $alias)->first(); if ($Branch) { $Rows = DB::table("visas") ->where("status", 1) ->where("branches_id", $Branch->branch_id) ->orderBy("display_order")->get(); return $Rows; } else { die("Branch not found"); } } public static function getBlogs($limit = 0) { $Rows = DB::table("blogs")->where("status", 1); if ($limit != 0) { $Rows = $Rows->limit($limit); } $Rows = $Rows->orderBy("display_order", 'desc')->get(); return $Rows; } public static function getGalleries() { $Rows = DB::table('galleries') ->where('status', 1)->get(); foreach ($Rows as $R) { $R->Photos = DB::table("photos")->where("galleries_id", $R->gallery_id)->where("status", 1)->orderBy("display_order")->get(); } return $Rows; } public static function getCustomFields($start = 0, $limit = null) { $query = DB::table("customfields") ->where("status", 1) ->orderBy("display_order"); if ($limit !== null) { $query->offset($start)->limit($limit); } $rows = $query->get(); return $rows; } public static function getTopReasonsForStudyDestination($alias, $limit = null) { $reasons_alias = 'top-reasons-to-' . $alias; $Rows = DB::table("countryarticles") ->where("status", 1) ->where("countries_id", function ($query) use ($alias) { $query->select("country_id") ->from("countries") ->where("alias", $alias); }) ->where("parent_article", function ($query) use ($reasons_alias) { $query->select("article_id") ->from("countryarticles") ->where("alias", $reasons_alias); }) ->orderBy("display_order") ->when($limit, function ($query) use ($limit) { return $query->limit($limit); }) ->get(); return $Rows; } public static function getRepresentingInstitutionsByCountry($alias, $limit = null) { $Rows = DB::table("institutions")->where("status", 1) ->where("countries_id", function ($query) use ($alias) { $query->select("country_id") ->from("countries") ->where("alias", $alias); }) ->orderBy("display_order") ->when($limit, function ($query) use ($limit) { return $query->limit($limit); }) ->get(); return $Rows; } //END TEMP FUNCTIONS public static function createMenuLink($text, $URL) { $isActive = request()->fullUrl() == $URL; $activeClass = $isActive ? 'active' : ''; ?>
  • where('status', 1)->orderBy('display_order')->get(); return $Gallery; } public static function getarticle($alias = '') { $t = "select * from tbl_articles where status=1"; if ($alias != '') { $t .= " and alias='$alias'"; // echo $t;die; $Aboutus = DB::select($t); $Aboutus = (!$Aboutus) ? $Aboutus = DB::select("select * from tbl_articles where status=1 LIMIT 1") : $Aboutus; $Aboutus = $Aboutus[0]; $q = "select * from tbl_articles where parent_article=$Aboutus->article_id"; $Aboutus->children = DB::select($q); } else { $Aboutus = DB::select($t); } //dd($Aboutus);die; return $Aboutus; } public static function showMenu($menulocation_alias) { $MenuItems = CCMS::getMenuItems($menulocation_alias); ?> where('alias', $menulocation_alias) ->value('menulocation_id'); $menuItems = DB::table('menuitems') ->where('menulocations_id', $menulocations_id) ->where('parent_menu', $parentId) ->orderBy('display_order') ->get(); $result = []; foreach ($menuItems as $menuItem) { $children = self::getMenuItems($menulocation_alias, $menuItem->menu_id); $menuItem->children = $children; $result[] = $menuItem; } return $result; } public static function getSiteVars() { $siteVars = DB::table("settings")->where('status', 1)->orderby('display_order')->first(); $siteVars->Destinations = self::getStudyAbroad(); $siteVars->Services = self::getServices(); $siteVars->Branches = self::getBranches(); $siteVars->Classes = self::getTestPreparations(); $siteVars->Abouts = self::getAbout(); return $siteVars; } public static function getCountries() { $Countries = DB::table("countries")->where('status', 1)->orderby('display_order')->get(); return $Countries; } public static function getCountry($alias) { $Countries = DB::table("countries")->where('alias', $alias)->get(); return $Countries[0]; } public static function getDemandCountries() { $demandCountries1 = DB::table('jobdemands')->where('status', 1)->orderby('display_order')->pluck('countries_id'); $demandCountries2 = DB::table('paperdemands')->where('status', 1)->orderby('display_order')->pluck('countries_id'); $demandCountries = $demandCountries1->concat($demandCountries2); // pre($demandCountries2,true); $demandCountries = DB::table("countries")->where('status', 1)->orderby('display_order')->whereIn('country_id', $demandCountries)->get(); return $demandCountries; } public static function getCertificates() { $Certificates = DB::table("certificates")->where('status', 1)->orderby('display_order')->get(); return $Certificates; } public static function getCertificate($alias) { $Certificate = DB::table("certificates")->where('alias', $alias)->get()[0]; return $Certificate; } public static function getTeams() { $Teams = DB::table("teams")->where('status', 1)->orderby('display_order')->get(); return $Teams; } public static function getTeamsByBranch($alias) { $Branch = DB::table("branches")->where("alias", $alias)->first(); if ($Branch) { $Teams = DB::table("teams") ->where('status', 1) ->where('branches_id', $Branch->branch_id) ->orderby('display_order')->get(); return $Teams; } else { die("Branch Not Found"); } } public static function getTeam($alias) { $Team = DB::table("teams")->where('alias', $alias)->get()[0]; return $Team; } public static function getPaperDemands() { $PaperDemands = DB::table("paperdemands")->where('status', 1)->orderby('display_order')->get(); return $PaperDemands; } public static function getPaperDemand($alias) { $PaperDemand = DB::table("paperdemands")->where('alias', $alias)->get()[0]; return $PaperDemand; } public static function getJobCategories() { $JobCategories = DB::table("job_categories")->where('status', 1)->orderby('display_order')->get(); return $JobCategories; } public static function getJobCategory($alias) { $JobCategory = DB::table("job_categories")->where('alias', $alias)->get()[0]; return $JobCategory; } public static function getCompanies() { $Companies = DB::table("companies")->where('status', 1)->orderby('display_order')->get(); return $Companies; } public static function getCompany($alias) { $Company = DB::table("companies")->where('alias', $alias)->get()[0]; return $Company; } public static function showForm($formID) { if (is_numeric($formID)) { $Form = DB::table("forms")->where('form_id', $formID)->first(); } else { $Form = DB::table("forms")->where('alias', $formID)->first(); } if (!$Form) { // Handle the case where the form with the given ID/alias doesn't exist return "Error: Form (ID/Alias: $formID) not found."; } $csrfToken = csrf_token(); if (session('success')) { echo ''; } echo '
    '; echo ''; echo ''; $form_fields = json_decode($Form->form_fields); foreach ($form_fields as $field) { $fieldAlias = strtolower($field->fieldAlias); $fieldName = strtolower($field->fieldName); $fieldType = $field->fieldType; $fieldDefault = $field->fieldDefault; $fieldCss = $field->fieldCss; echo '
    '; echo ''; // Check if the "required" class is present in $fieldCss and add the required attribute $isRequired = strpos($fieldCss, 'required') !== false; if ($fieldType === 'textarea') { echo ''; } else { echo ''; } echo '
    '; } echo ''; echo '
    '; } private function initDB() { static $initialized = false; if (!$initialized) { DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_accridiations` ( `accridiation_id` int(11) AUTO_INCREMENT PRIMARY KEY, `display` varchar(255) NULL DEFAULT NULL, `title` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_activity_logs` ( `activity_id` bigint(20) AUTO_INCREMENT PRIMARY KEY, `user_id` int(11) DEFAULT NULL, `controllerName` varchar(100) DEFAULT NULL, `methodName` varchar(100) DEFAULT NULL, `actionUrl` varchar(255) NULL DEFAULT NULL, `activity` varchar(255) NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_articles` ( `article_id` int(11) AUTO_INCREMENT PRIMARY KEY, `parent_article` int(11) DEFAULT 0, `title` varchar(250) NULL DEFAULT NULL, `subtitle` text NULL DEFAULT NULL, `alias` varchar(250) NULL DEFAULT NULL, `description` longtext NULL DEFAULT NULL, `additional_description` longtext NULL DEFAULT NULL, `cover_photo` varchar(500) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_blogs` ( `blog_id` int(11) AUTO_INCREMENT PRIMARY KEY, `parent_blog` int(11) NULL DEFAULT NULL, `title` text NULL DEFAULT NULL, `alias` text NULL, `text` text NULL DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_brancharticles` ( `article_id` int(11) AUTO_INCREMENT PRIMARY KEY, `branches_id` int(11) NULL , `parent_article` int(11) DEFAULT 0, `title` varchar(250) NULL DEFAULT NULL, `alias` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `description` text DEFAULT NULL, `thumb` varchar(250) NULL DEFAULT NULL, `cover_photo` varchar(500) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_menulocations` ( `menulocation_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_branches` ( `branch_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `parent_branch` varchar(255) NULL DEFAULT NULL, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `contact_person` varchar(250) NULL DEFAULT NULL, `designation` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `cover_photo` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `description` text DEFAULT NULL, `contact1` varchar(250) NULL DEFAULT NULL, `contact2` varchar(250) NULL DEFAULT NULL, `email` varchar(250) NULL DEFAULT NULL, `address` text NULL DEFAULT NULL, `google_map` text NULL DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `seo_keywords` text NULL DEFAULT NULL, `seo_title` text NULL DEFAULT NULL, `seo_description` text NULL DEFAULT NULL, `og_tags` text NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_certificates` ( `certificate_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `photo` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `text` varchar(255) NULL DEFAULT NULL, `description` text DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_contacts` ( `contact_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `forms_id` int(11) DEFAULT NULL, `branches_id` int(11) NULL , `name` varchar(255) NULL DEFAULT NULL, `tagline` varchar(255) NULL DEFAULT NULL, `address` varchar(255) NULL DEFAULT NULL, `tel` varchar(20) NOT NULL, `fax` varchar(255) NULL DEFAULT NULL, `email1` varchar(255) NULL DEFAULT NULL, `email2` varchar(255) NULL DEFAULT NULL, `website` varchar(255) NULL DEFAULT NULL, `google_map` text NULL DEFAULT NULL, `facebook` varchar(50) NULL, `hp1` varchar(50) NULL, `hp2` varchar(50) NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `remarks` text NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_countries` ( `country_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `details` text NULL DEFAULT NULL, `cover_photo` varchar(255) NULL DEFAULT NULL, `images` longtext NULL DEFAULT NULL, `image_thumb` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_countryarticles` ( `article_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `countries_id` int(11) DEFAULT NULL, `parent_article` int(11) DEFAULT 0, `title` varchar(250) DEFAULT NULL, `alias` varchar(250) DEFAULT NULL, `text` text NULL DEFAULT NULL, `cover_photo` varchar(500) DEFAULT NULL, `thumb` varchar(250) NULL DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_customfields` ( `customfield_id` int(11) AUTO_INCREMENT PRIMARY KEY, `customfield_for` varchar(250) NULL DEFAULT NULL, `customfield_forref` varchar(250) NULL DEFAULT NULL, `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `link` varchar(500) NULL DEFAULT NULL, `fa_icon` varchar(250) NULL DEFAULT NULL, `logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); // tbl_enquiries DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_enquiries` ( `enquiry_id` int(11) AUTO_INCREMENT PRIMARY KEY, `name` varchar(255) NULL DEFAULT NULL, `email` varchar(255) NULL DEFAULT NULL, `phone` varchar(255) NULL DEFAULT NULL, `qualification` varchar(255) NULL DEFAULT NULL, `score` varchar(255) NULL DEFAULT NULL, `passed_year` varchar(255) NULL DEFAULT NULL, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; '); // tbl_error_logs DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_error_logs` ( `id` bigint(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, `user_id` bigint(20) UNSIGNED DEFAULT NULL, `controller_name` varchar(255) NULL DEFAULT NULL, `method_name` varchar(255) NULL DEFAULT NULL, `errors` longtext NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; '); // tbl_events DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_events` ( `event_id` int(11) AUTO_INCREMENT PRIMARY KEY, `startdate` date NOT NULL, `enddate` datetime NOT NULL, `title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `alias` varchar(250) NULL DEFAULT NULL, `text` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `link` varchar(250) NULL DEFAULT NULL, `seo_title` text NULL DEFAULT NULL, `seo_description` text NULL DEFAULT NULL, `seo_keywords` text NULL DEFAULT NULL, `og_tags` text NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); // tbl_failed_jobs DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_failed_jobs` ( `id` bigint(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, `uuid` varchar(255) NULL DEFAULT NULL, `connection` text NULL DEFAULT NULL, `queue` text NULL DEFAULT NULL, `payload` longtext NULL DEFAULT NULL, `exception` longtext NULL DEFAULT NULL, `failed_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; '); // tbl_faqs DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_faqs` ( `faq_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `text` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); // tbl_forms DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_forms` ( `form_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `cover_photo` varchar(255) NULL DEFAULT NULL, `image_thumb` varchar(255) NULL DEFAULT NULL, `form_fields` text NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `headers` text NULL DEFAULT NULL, `toemail` varchar(255) NULL DEFAULT NULL, `fromemail` varchar(255) NULL DEFAULT NULL, `emailsubject` varchar(255) NULL DEFAULT NULL, `emailtext` text NULL DEFAULT NULL, `autoresponse` varchar(255) NULL DEFAULT NULL, `responseheaders` varchar(255) NULL DEFAULT NULL, `responsefrom` varchar(255) NULL DEFAULT NULL, `responsesubject` varchar(255) NULL DEFAULT NULL, `responsetext` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); // tbl_formsubmissions DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_formsubmissions` ( `formsubmission_id` int(10) UNSIGNED NOT NULL, `forms_id` int(10) UNSIGNED NOT NULL, `submitted_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`submitted_values`)), `display_order` int(11) NOT NULL DEFAULT 1 DEFAULT 0, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; '); // tbl_galleries DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_galleries` ( `gallery_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `thumb` text NULL DEFAULT NULL, `images` longtext NULL DEFAULT NULL, `cover_photo` varchar(250) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); // tbl_institutions DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_institutions` ( `institution_id` int(11) AUTO_INCREMENT PRIMARY KEY, `countries_id` int(11) NULL , `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `email` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `logo` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); // tbl_menuitems DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_menuitems` ( `menu_id` int(11) AUTO_INCREMENT PRIMARY KEY, `parent_menu` int(11) NOT NULL, `menulocations_id` int(11) NULL , `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `type` varchar(255) NULL DEFAULT NULL, `ref` varchar(255) NULL DEFAULT NULL, `target` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); // tbl_menulocations DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_menulocations` ( `menulocation_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_migrations` ( `id` int(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, `migration` varchar(255) NULL DEFAULT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_milestones` ( `milestone_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `display` varchar(255) NULL DEFAULT NULL, `title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `text` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_news` ( `news_id` int(11) AUTO_INCREMENT PRIMARY KEY, `parent_news` int(11) NOT NULL, `title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `alias` varchar(50) NULL, `text` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_operation_logs` ( `refNo` varchar(255) NULL DEFAULT NULL, `operation_id` bigint(20) AUTO_INCREMENT PRIMARY KEY, `user_id` int(11) DEFAULT NULL, `operation_start_no` bigint(20) DEFAULT NULL, `operation_end_no` bigint(20) DEFAULT NULL, `model_name` varchar(100) DEFAULT NULL, `model_id` int(11) DEFAULT NULL, `operation_name` varchar(100) DEFAULT NULL, `previous_values` text DEFAULT NULL, `new_values` longtext DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_password_reset_tokens` ( `email` varchar(255) NULL DEFAULT NULL, `token` varchar(255) NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_personal_access_tokens` ( `id` bigint(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, `tokenable_type` varchar(255) NULL DEFAULT NULL, `tokenable_id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) NULL DEFAULT NULL, `token` varchar(64) NOT NULL, `abilities` text DEFAULT NULL, `last_used_at` timestamp NULL DEFAULT NULL, `expires_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_photos` ( `photo_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `galleries_id` int(11) NULL , `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_popups` ( `popup_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(250) NULL DEFAULT NULL, `alias` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `photo` varchar(500) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_preparationclasses` ( `preparationclass_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `parent_preparationclass` int(11) NOT NULL, `description` longtext NULL DEFAULT NULL, `additional_description` longtext NULL DEFAULT NULL, `intro` text NULL DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `remarks` text NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_preparationclasstestimonials` ( `testimonial_id` int(11) AUTO_INCREMENT PRIMARY KEY, `preparationclasses_id` int(11) NULL, `name` varchar(255) NULL DEFAULT NULL, `student` varchar(255) NULL DEFAULT NULL, `rating` varchar(255) NULL DEFAULT NULL, `message` text NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `remarks` text NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_features` ( `feature_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `icon` varchar(255) NULL DEFAULT NULL, `number` integer NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `remarks` text NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_preparationclassoffers` ( `preparationclassoffer_id` int(11) AUTO_INCREMENT PRIMARY KEY, `preparationclasses_id` int(11) NULL, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `classtime` time NULL DEFAULT NULL, `details` text NULL DEFAULT NULL, `intro` text NULL DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `remarks` text NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_programs` ( `program_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `countries_id` int(11) NULL , `details` text NULL DEFAULT NULL, `required_documents` text NULL DEFAULT NULL, `qualification` text NULL DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `remarks` text NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_quicklinks` ( `quicklink_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `alias` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `link` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `thumb` varchar(250) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_resources` ( `resource_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `resourcetypes_id` int(11) NULL , `parent_resource` int(11) DEFAULT 0, `title` varchar(250) NULL DEFAULT NULL, `alias` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `link` varchar(500) NULL DEFAULT NULL, `cover_photo` varchar(500) NULL DEFAULT NULL, `thumb` varchar(250) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_resourcetypes` ( `resourcetype_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `parent_resourcetype` int(11) DEFAULT 0, `title` varchar(250) NULL DEFAULT NULL, `alias` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `cover_photo` varchar(500) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_services` ( `service_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `parent_service` int(11) DEFAULT 0, `title` varchar(250) NULL DEFAULT NULL, `alias` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `link` varchar(500) NULL DEFAULT NULL, `cover_photo` varchar(500) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `seo_keywords` text DEFAULT NULL, `seo_title` text DEFAULT NULL, `seo_descriptions` text DEFAULT NULL, `og_tags` text DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_settings` ( `setting_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `description` text NULL DEFAULT NULL, `url1` varchar(255) NULL DEFAULT NULL, `url2` varchar(255) NULL DEFAULT NULL, `location` varchar(255) NULL DEFAULT NULL, `email` varchar(255) NULL DEFAULT NULL, `phone` varchar(255) NULL DEFAULT NULL, `secondary_phone` varchar(255) NULL DEFAULT NULL, `working_hours` varchar(255) NULL DEFAULT NULL, `working_days` varchar(255) NULL DEFAULT NULL, `leave_days` varchar(255) NULL DEFAULT NULL, `google_map` text NULL DEFAULT NULL, `fb` varchar(255) NULL DEFAULT NULL, `insta` varchar(255) NULL DEFAULT NULL, `twitter` varchar(255) NULL DEFAULT NULL, `tiktok` varchar(255) NULL DEFAULT NULL, `youtube` varchar(255) NULL DEFAULT NULL, `primary_logo` varchar(255) NULL DEFAULT NULL, `secondary_logo` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `icon` varchar(255) NULL DEFAULT NULL, `og_image` varchar(255) NULL DEFAULT NULL, `no_image` varchar(250) NULL DEFAULT NULL, `copyright_text` varchar(250) NULL DEFAULT NULL, `content1` text NULL DEFAULT NULL, `content2` text NULL DEFAULT NULL, `content3` text NULL DEFAULT NULL, `seo_title` varchar(255) NULL DEFAULT NULL, `seo_description` text NULL DEFAULT NULL, `seo_keywords` text NULL DEFAULT NULL, `og_tags` text NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_shortcodes` ( `shortcode_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `text` varchar(255) NULL DEFAULT NULL, `description` text DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_sliders` ( `slider_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `slider_title` varchar(255) NULL DEFAULT NULL, `slider_desc` varchar(255) NULL DEFAULT NULL, `url1` varchar(255) NULL DEFAULT NULL, `url2` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_successstories` ( `successstory_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `countries_id` int(11) DEFAULT NULL, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(200) DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `remarks` varchar(255) NULL DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `university` varchar(255) NULL DEFAULT NULL, `faculty` varchar(255) NULL DEFAULT NULL, `createdby` varchar(255) NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updatedby` varchar(255) NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_teams` ( `team_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `branches_id` int(11) NULL , `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(255) NULL DEFAULT NULL, `photo` varchar(255) NULL DEFAULT NULL, `thumb` varchar(255) NULL DEFAULT NULL, `designation` varchar(255) NULL DEFAULT NULL, `role` varchar(255) NULL DEFAULT NULL, `description` text DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_testimonials` ( `testimonial_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `branches_id` int(11) DEFAULT NULL, `for` varchar(255) NULL DEFAULT NULL, `ref` int(11) DEFAULT 0, `by` varchar(255) NULL DEFAULT NULL, `rating` int(11) NULL DEFAULT NULL, `alias` varchar(200) DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `remarks` varchar(255) NULL DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `testimonials_faculty` varchar(255) NULL DEFAULT NULL, `testimonials_university` varchar(255) NULL DEFAULT NULL, `university` varchar(255) NULL DEFAULT NULL, `faculty` varchar(255) NULL DEFAULT NULL, `createdby` varchar(255) NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updatedby` varchar(255) NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_users` ( `id` bigint(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, `name` varchar(255) NULL DEFAULT NULL, `email` varchar(255) NULL DEFAULT NULL, `username` varchar(255) NULL DEFAULT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `status` int(11) NOT NULL DEFAULT 1, `password` varchar(255) NULL DEFAULT NULL, `is_admin` boolean NULL DEFAULT NULL, `remember_token` varchar(100) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_visagrantposts` ( `visagrantpost_id` int(11) AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(200) DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `remarks` varchar(255) NULL DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `display_type` int(11) NOT NULL DEFAULT 1, `status` int(11) DEFAULT NULL, `createdby` varchar(255) NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updatedby` varchar(255) NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_visas` ( `visa_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `branches_id` int(11) DEFAULT NULL, `for` varchar(255) NULL DEFAULT NULL, `ref` int(11) DEFAULT 0, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(200) DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `description` text DEFAULT NULL, `text` text NULL DEFAULT NULL, `university` varchar(255) NULL DEFAULT NULL, `faculty` varchar(255) NULL DEFAULT NULL, `remarks` varchar(255) NULL DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `createdby` varchar(255) NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updatedby` varchar(255) NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_subscribers` ( `subscriber_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `email` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_faqs` ( `faq_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `title` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `text` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_successstories` ( `successstory_id` int(11) AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY, `countries_id` int(11) DEFAULT NULL, `title` varchar(255) NULL DEFAULT NULL, `alias` varchar(200) DEFAULT NULL, `image` varchar(255) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `remarks` varchar(255) NULL DEFAULT NULL, `display_order` int(11) DEFAULT NULL, `status` int(11) DEFAULT NULL, `university` varchar(255) NULL DEFAULT NULL, `faculty` varchar(255) NULL DEFAULT NULL, `createdby` varchar(255) NULL DEFAULT NULL, `created_at` varchar(255) NULL DEFAULT NULL, `updatedby` varchar(255) NULL DEFAULT NULL, `updated_at` varchar(255) NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_success_stories` ( `stories_id` int(11) AUTO_INCREMENT PRIMARY KEY, `display` varchar(255) NULL DEFAULT NULL, `title` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `extra_content` LONGTEXT NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_benefits` ( `benefit_id` int(11) AUTO_INCREMENT PRIMARY KEY, `display` varchar(255) NULL DEFAULT NULL, `title` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `extra_content` LONGTEXT NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_visa_grants` ( `visa_id` int(11) AUTO_INCREMENT PRIMARY KEY, `display` varchar(255) NULL DEFAULT NULL, `title` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `extra_content` LONGTEXT NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); DB::statement(' CREATE TABLE IF NOT EXISTS `tbl_banners` ( `banner_id` int(11) AUTO_INCREMENT PRIMARY KEY, `display` varchar(255) NULL DEFAULT NULL, `title` varchar(250) NULL DEFAULT NULL, `text` text NULL DEFAULT NULL, `extra_content` LONGTEXT NULL DEFAULT NULL, `cover` varchar(255) NULL DEFAULT NULL, `display_order` int(11) NOT NULL DEFAULT 1, `status` int(11) NOT NULL DEFAULT 1, `createdby` int(11) DEFAULT NULL, `updatedby` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 '); if (!(DB::table('users')->first())) { DB::statement("INSERT INTO `tbl_users` (`id`, `name`, `email`, `username`, `email_verified_at`, `status`, `password`, `is_admin`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Prajwal Adhikari', 'prajwalbro@hotmail.com', 'prajwalbro@hotmail.com', '2024-04-18 09:59:01', 1, '$2y$10$3zlF9VeXexzWKRDPZuDio.W7RZIC3tU.cjwMoLzG8ki8bVwAQn1WW', 1, NULL, '2024-04-18 09:58:39', '2024-04-18 09:58:46');"); } if (!(DB::table('settings')->first())) { DB::statement("INSERT INTO `tbl_settings` (`title`, `description`, `status`) values ('Bibhuti LMS', '', '1');"); } if (!Schema::hasColumn('testimonials', 'rating')) { Schema::table('testimonials', function (Blueprint $table) { $table->integer('rating')->nullable(); }); } if (Schema::hasColumn('blogs', 'parent_blog')) { Schema::table('blogs', function (Blueprint $table) { $table->dropColumn('parent_blog'); }); } if (!Schema::hasColumn('preparationclassoffers', 'classtime')) { Schema::table('preparationclassoffers', function (Blueprint $table) { $table->time('classtime')->nullable(); }); } if (!Schema::hasColumn('settings', 'recaptcha_secret_key')) { Schema::table('settings', function (Blueprint $table) { $table->string('recaptcha_secret_key')->nullable(); }); } if (!Schema::hasColumn('settings', 'recaptcha_site_key')) { Schema::table('settings', function (Blueprint $table) { $table->string('recaptcha_site_key')->nullable(); }); } if (!Schema::hasColumn('popups', 'end_date')) { Schema::table('popups', function (Blueprint $table) { $table->date('end_date')->nullable()->default(null); }); } if (!Schema::hasColumn('popups', 'btn_label')) { Schema::table('popups', function (Blueprint $table) { $table->string('btn_label')->nullable()->default(null); }); } if (!Schema::hasColumn('popups', 'btn_link')) { Schema::table('popups', function (Blueprint $table) { $table->string('btn_link')->nullable()->default(null); }); } // if (!Schema::hasColumn('enquiries', 'mobile')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('mobile')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'qualification')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('qualification')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'board')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('board')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'testprep')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('testprep')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'score')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('score')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'preferred_destination')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('preferred_destination')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'mode_of_counselling')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('mode_of_counselling')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'nearest_branch')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('nearest_branch')->nullable(); // }); // } // if (!Schema::hasColumn('enquiries', 'message')) { // Schema::table('enquiries', function (Blueprint $table) { // $table->string('message')->nullable(); // }); // } $initialized = true; } } }