PHP code example of chengkangzai / laravel-apu-schedule

1. Go to this page and download the library: Download chengkangzai/laravel-apu-schedule library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chengkangzai / laravel-apu-schedule example snippets


use Chengkangzai\ApuSchedule\ApuSchedule;

$intakes = ApuSchedule::getIntakes(); // Returns: UC3F2111SE, AFCF2011AS ...

use Chengkangzai\ApuSchedule\ApuSchedule;

$groupings = ApuSchedule::getGroupings("UC3F2111SE"); // Returns: G1, G2, G3 ...

use Chengkangzai\ApuSchedule\ApuSchedule;

$schedule = ApuSchedule::getSchedule("UC3F2111SE", "G1");

use Chengkangzai\ApuSchedule\ApuHoliday;

$allHolidays = ApuHoliday::getAll(); // Returns a collection of holidays

use Chengkangzai\ApuSchedule\ApuHoliday;

$holidaysFor2023 = ApuHoliday::getByYear(2023); // Returns holidays for 2023

[
    "holiday_description" => "New Year's Day",
    "holiday_end_date" => "Sat, 01 Jan 2022 00:00:00 GMT",
    "holiday_name" => "New Year's Day",
    "holiday_people_affected" => "all",
    "holiday_start_date" => "Sat, 01 Jan 2022 00:00:00 GMT",
    "id" => 336,
]
json
[
    {
        "INTAKE": "...",
        "MODID": "...",
        "MODULE_NAME": "...",
        "DAY": "...",
        "LOCATION": "...",
        "ROOM": "...",
        "LECTID": "...",
        "NAME": "...",
        "SAMACCOUNTNAME": "...",
        "DATESTAMP": "...",
        "DATESTAMP_ISO": "...",
        "TIME_FROM": "...",
        "TIME_TO": "...",
        "TIME_FROM_ISO": "...",
        "TIME_TO_ISO": "...",
        "GROUPING": "...",
        "CLASS_CODE": "...",
        "COLOR": "..."
    },
    {}
]