Tailor Entries Collection Not Paginating

Hi, this may be straightforward but I somehow can’t get it to work. I am loading a collection of Tailor Entry model in my php section of page as below:

function onStart(){
        $this['events'] = EntryRecord::inSection('Events\Event')->get();
}

I then use the twig code to paginate the collection:

{% set events = events.paginate(5) %}

This doesn’t seem to work (blank collection) unless if I use the Tailor collection component instead (which I don’t intend to). Can someone guide me on what the right approach should be as the documentation does specify that pagination should work either way.

Thanks in advance.

try:

$this['events'] = EntryRecord::inSection('Events\Event')->paginate(5);
1 Like

Thank you for the response. This does the trick! Cheers.

1 Like