Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
ViewModel not work
  • ViewModel: app/views/index.php <?php class View_Index extends ViewModel
    { public function view()
    {
    $this->title = "Testing this ViewModel thing";
    }
    } View app/views/index.php <h1><?php echo $title; ?></h1>
    Controller app/classes/controller/home.php public function action_index()
    {
    ViewModel::forge('index');
    }
    But it did not work, is there any wrong?
  • A viewmodel is a class and should therefore go in app/classes/view. If something doesn't work as expected, tell us what you have done, what you expected, what the error message was. We can't do much with "it doesnt work"...

Howdy, Stranger!

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

In this Discussion