HMVC question

Hi!!!

How to use the files from views??

The output is a function of the "echo" in action



33.0k

from the example on github

public function helloAction()
    {
        return new Response('hello there');
    }

whether you can use the view files???



90.9k

You can get the file and return it as part of the response:

public function helloAction()
{
    return new Response(file_get_contents('my-path/my-file.txt'));
}


33.0k

All the same, why not use the files in the folder views???