Jump to content

Bootstrapping: $wire is null?


MarcC
 Share

Recommended Posts

I just received this in an email from a developer I'm working with:

...in my code, after including/bootstrapping as per his site, I can use (for example) wire('pages') but not $wire->pages. The docs say I should be able to use either way, but for me $wire is NULL.

Any idea what might be going wrong? Thanks.

Link to comment
Share on other sites

I don't think there's any way for us to tell why $wire isn't working without seeing the code context where it's not working. I have a feeling he's trying to use $wire from within a function or class, and it's out of scope. But I would suggest using the wire() function either way, as that's going to be more portable in most use cases.

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

  • Recently Browsing   0 members

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