Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

danielg516's avatar

Full Calendar helper with google calendar api.

Hi, I implemented a fullcalendar using the Laravel Full Calendar Helper (https://github.com/maddhatter/laravel-fullcalendar), I need to include the holydays, so i tried to consuming the google calendar api, the doc about fullcalendar javascript show how to do that (https://fullcalendar.io/docs/v3/google-calendar) but i don't now how to make that with the lavel fullcalendar helper.

Thanks in advance.

0 likes
1 reply
danielg516's avatar

This is how the calendar is created or at least how the event are added.

public function index() {

    $events = [];

    $data = Event::all();
    if($data->count()) {
        foreach ($data as $key => $value) {
            if($value->vuelo_id){
                $events[] = Calendar::event(
                    $value->title,

                    true,
                    new \DateTime($value->start_date),
                    new \DateTime($value->end_date.' +1 day'),
                    null,
                    // Add color and link on event

                    [
                        'color' => '#f05050',
                        'url' => '/vervuelohome/'.$value->vuelo_id.'',
                    ]

                );
            }
        }
    }
    $calendar = Calendar::addEvents($events)->setOptions(['lang' => 'es']);
    return view('Inicio', compact('calendar'));
}

Please or to participate in this conversation.