PHP code example of stargrid / laravel-calendario-feriados

1. Go to this page and download the library: Download stargrid/laravel-calendario-feriados 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/ */

    

stargrid / laravel-calendario-feriados example snippets


$holidayClient = new StarGrid\LaravelHolidayCalendar\HolidayClient(env('LARAVEL_HOLIDAY_CALENDAR_TOKEN'));

$holidayClient = new StarGrid\LaravelHolidayCalendar\HolidayClient(env('LARAVEL_HOLIDAY_CALENDAR_TOKEN'));
$holidayClient->setJsonResponse();

$holidayClient = new StarGrid\LaravelHolidayCalendar\HolidayClient(env('LARAVEL_HOLIDAY_CALENDAR_TOKEN'));
$holidayClient->setXmlResponse();

$response = $client->setJsonResponse()
            ->getHolidaysByIbgeCode(2019, 4314902);

$response = $client->setJsonResponse()
            ->getHolidaysByCity(2019, 'São Paulo' , 'SP');
 
public function getDate(): \DateTime
public function getName(): string
public function getDescription(): string
public function getLink(): string
public function getTypeEnum(): HolidayTypeEnum
public function getTypeName(): string
public function getRawData(): string



namespace App\Http\Controllers;

use StarGrid\LaravelHolidayCalendar\HolidayClient;

class HomeController
{
    public function testMethod(HolidayClient $holidayClient)
    {
        $response = $holidayClient->setJsonResponse()
                    ->getHolidaysByCity(2019, 'São Paulo' , 'SP');    
    }
}



namespace App\Http\Controllers;

use StarGrid\LaravelHolidayCalendar\Facade\HolidayClientFacade;

class HomeController
{
    public function testMethod()
    {
        $response = HolidayClientFacade::setJsonResponse()
                    ->getHolidaysByCity(2019, 'São Paulo' , 'SP');    
    }
}