Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Understanding viewModel
  • I know this might defeat the purpose of using a viewModel but in some cases
    i need to a DB check prior to calling the viewmodel ( access check for example) ..in that DB check I can already get some info i need for my view ( but not all) in such case if i can pass a variable to the viewmodel, it would save me another DB call. is there a way to pass a variable to the viewmodel? if not how do I minimize my DB calls , should i remove the viewmodel altogether?
    thanks
  • A Viewmodel class has the same set of methods as a View class, so you can use set() like you're used to.
  • This was a double post it seems. I answered basically the same thing in the other one. I wil close this one.
This discussion has been closed.
All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion