Jump to content

Not first image


a-ok
 Share

Recommended Posts

Hi folks,

I know how to get ONLY the first image from an Image field, but how to you exclude the first image?

<?php foreach ($page->project_images->not()->first() as $image) : ?>

Any thoughts?


Sorry... just noticed slice in the cheatsheet...

<?php foreach ($page->project_images->slice(1) as $image) : ?>
  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...