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

engrlaravel's avatar

Generate .ics calendar file in php laravel

I want to generate a calendar file for meeting & send invitation for attendees, Is there any plugin or code in laravel?

what type of files should it support? and how to generate in php?

0 likes
3 replies
FerranMunoz's avatar

Yes, but this ics file can't use it in Laravel (can't attached in a mail or put the route in a href link).

kikebeltran's avatar

Hi @engrlaravel @ferranmunoz try it in your Mail class.

return $this->view('emails.bla-bla')
            ->attach($link->ics(),  ['as' => 'event.ics', 'mime' => 'text/calendar'])
            ->subject("Email subject");

I hope this proves useful

2 likes

Please or to participate in this conversation.