Laravel и Бесконечный Свиток

У меня есть вопрос о пагинации в Laravel и бесконечной прокрутке:

Прежде всего, у меня есть это:

   



    @forelse($duels->results as $d)

        

            @include('versus.versus')

        



    @empty



    @endforelse




    
        {{$duels->links()}}
    

Как мы видим, у меня есть div #boxes, которые содержат divs .box. Пагинация установлена Laravel и выглядит так:


    
        
            
                <a href="#">« Previous</a>
                <a href="#">1</a> <a href="index.php?page=2">2</a>
                <a href="index.php?page=2">Next »</a>
            
                  
      

Итак, теперь я хочу поставить бесконечный свиток вместо нумерации страниц. Как я должен делать, используяhttps://github.com/paulirish/infinite-scroll?

Я остаюсь здесь, если у вас есть вопросы!

PS: яМы пробовали несколько вещей, но ни одна из них не работала так:

    $('#boxes').infinitescroll({
    loading: {
        finished: undefined,
        finishedMsg: "Congratulations, you've reached the end of the internet.",
        msg: null,
        msgText: "Loading the next set of posts...",
        selector: null,
        speed: 'fast',
        start: undefined
    },
    state: {
        isDuringAjax: false,
        isInvalidPage: false,
        isDestroyed: false,
        isDone: false, // For when it goes all the way through the archive.
        isPaused: false,
        currPage: 1
    },
    debug: false,
    behavior: undefined,
    binder: $(window), // used to cache the selector for the element that will be scrolling
    nextSelector: "div.paginate li.active a",
    navSelector: "div.paginate",
    contentSelector: null, // rename to pageFragment
    extraScrollPx: 0,
    itemSelector: "div.notizy",
    animate: false,
    pathParse: undefined,
    dataType: 'html',
    appendCallback: true,
    bufferPx: 40,
    errorCallback: function () { },
    infid: 0, //Instance ID
    pixelsFromNavToBottom: undefined,
    path: undefined, // Can either be an array of URL parts (e.g. ["/page/", "/"]) or a function that accepts the page number and returns a URL
    prefill: false, // When the document is smaller than the window, load data until the document is larger or links are exhausted
    maxPage:undefined // to manually control maximum page (when maxPage is undefined, maximum page limitation is not work)
});

На основе примера страницы github (и замены того, что должно быть заменено), но естьЭто абсолютно никакого эффекта.

Ответы на вопрос(3)

Ваш ответ на вопрос