use EventRegister\Event; $event = new Event(); $event->setTitle("Webinar on PHP Event Register") ->setDateTime(new DateTime("2021-05-10 19:00:00")) ->setLocation("Online") ->setDescription("Learn how to use PHP Event Register in your web applications.") ->create();
use EventRegister\Attendee; $attendee = new Attendee(); $attendee->setName("John Smith") ->setEmail("john.smith@example.com") ->register($event);
use EventRegister\Event; $event = Event::findById(1); echo $event->getTitle(); echo $event->getDateTime()->format("Y-m-d H:i:s"); echo $event->getLocation(); echo $event->getDescription();PHP Event Register is a package library that can be downloaded from sources such as Packagist, and it requires an installation via a package manager such as Composer.