Optimisation with Offset and Limit. Part 2

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 6

  • @vsvid
    @vsvid 11 месяцев назад +1

    Great! Thank you 👌

  • @kaibe5241
    @kaibe5241 Год назад +1

    You could also just setup an action to append more models to the collection. No need for all this logic going on.

    • @CodewithBurt
      @CodewithBurt  Год назад

      You could, but that would generate more queries. Because of the safety mechanism inside eloquent.

    • @kaibe5241
      @kaibe5241 Год назад

      How so? The action loads the next 10, and appends it to the existing collection.@@CodewithBurt

    • @oli7173
      @oli7173 7 месяцев назад

      @@kaibe5241 Each time you call that action, the Livewire component is hydrated which uses the EloquentCollectionSynth shown in the video and refetches every model in the collection.