How to make a custom pagination from an array in laravel easiest way​

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

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

  • @aminkavoosi
    @aminkavoosi 4 месяца назад

    thats good. but you query on all data.

  • @wichodebalcones
    @wichodebalcones 2 года назад +3

    thanks, it worked for me using "withPath" in place of "path". in Laravel 8

    • @ZarxBiz
      @ZarxBiz  2 года назад

      Good to know it helped 👍

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

    Hello. Thank you for the lesson. How to add sorting in paginator!?

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

    How to do a search in that array?

  • @Scott-uk1wv
    @Scott-uk1wv 2 года назад

    Using Laravel 8 I am creating an array with custom data to send to a named view. The pagination works for page 1 but when I try to go to page 2 I am redirected to /?=page2 instead of /view?=page2. I tried using $data->path('') as well as $data->path('view') but I am still being redirected to /?=page2. Any suggestions?

    • @ZarxBiz
      @ZarxBiz  2 года назад

      Thanks for writing in. Hard to answer can you share your code. I will try to answer after watching it. Thanks

    • @mohamadfarhanbinmohdfauzi2962
      @mohamadfarhanbinmohdfauzi2962 2 года назад +3

      use $data->withPath('view') in your case.

    • @thenguyensy5735
      @thenguyensy5735 2 года назад +1

      @@mohamadfarhanbinmohdfauzi2962 thank you i did it

    • @wichodebalcones
      @wichodebalcones 2 года назад +1

      @@mohamadfarhanbinmohdfauzi2962 i haved same problem but with your suggestion i fix it, thanks