This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

milanblasko2844565
milanblasko2844565

Hi I have a collection images from record. Its a gallery. array:1 [▼ 7 => Collection {#1969 ▼

items: array:18 [▼

  0 => File {#1970 ▶}
  1 => File {#1977 ▶}
  2 => File {#1984 ▶}
  3 => File {#1991 ▶}
  4 => File {#1998 ▶}
  5 => File {#2005 ▶}
  6 => File {#2012 ▶}
  7 => File {#2019 ▶}
  8 => File {#2026 ▶}
  9 => File {#2033 ▶}
  10 => File {#2040 ▶}
  11 => File {#2047 ▶}
  12 => File {#2054 ▶}
  13 => File {#2061 ▶}
  14 => File {#2068 ▶}
  15 => File {#2075 ▶}
  16 => File {#2082 ▶}
  17 => File {#2089 ▶}
]

} ] And PHP:

<?php

function onStart(){
        use Kiwi\MagnificGallery\Models\Gallery;
        $galleries = Gallery::where("our_works", 1)->take(1)->get();
        $images = [];
        foreach ($galleries as $gallery) {
            $images[$gallery->id] = $gallery->images;
        }
        $this["images"] = $images;
        $this["editUrl"] = Backend::url("kiwi/magnificgallery/galleries/update/");
        //dd($images);
    }

?>  

Can I paginate this array?? Sorry for question but I'm not Backend developer.

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.