Skip to content

Specify Event IDs

Compare
Choose a tag to compare
@maddhatter maddhatter released this 21 May 13:26
· 21 commits to master since this release

Added ability to set event IDs:

$event = \Calendar::event(
    "Valentine's Day", //event title
    true, //full day event?
    '2015-02-14', //start time, must be a DateTime object or valid DateTime format (http://bit.ly/1z7QWbg)
    '2015-02-14' //end time, must be a DateTime object or valid DateTime format (http://bit.ly/1z7QWbg),
    1 //optional event ID
);
class EventModel extends Eloquent implements \MaddHatter\LaravelFullcalendar\IdentifiableEvent
{

    // Implement all Event methods ...

    /**
     * Get the event's ID
     *
     * @return int|string|null
     */
    public function getId();

}