DEV Community

Discussion on: Adding events to calendar automatically from email

Collapse
 
lluukinha profile image
Lucas Souza

What happens if you need to update the event?

Collapse
 
arxeiss profile image
Pavel Kutáč

Good question. That should be possible, but I wasn't checking it so much. Maybe tip for future article :)

Collapse
 
zenon profile image
Tomasz Mrozinski • Edited

If you want to update event you should always increase sequence in ics file.
It's quite simple with Spatie lib, you just need to add the following to your event object:

$event->appendProperty(TextProperty::create('SEQUENCE', sequence_value));

initial: sequence_value = 0,
first update: sequence_value = 1
.....
nth update: sequence_value = n