Jump to content

Recommended Posts

Posted

Hello,

I'm trying to access a file called 'myotherlogo.png' from a page, but I cannot.

Tried:

$pages->get(1)->image('name=myotherlogo.png')->url // method Page::image does not exist
$pages->get(1)->image->first->url // this works, but I don't need the first

Thanks!!

Posted

Managed to do this

$pages->get(1)->get("image")->get("name=myotherlogo.png")->url

and even

$pages->get(1)->image->get("name=myotherlogo.png")->url

I guess it's the shortest version...

  • Like 2

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...