HMVC question

Hi!!!

How to use the files from views??

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



27.6k

from the example on github

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

whether you can use the view files???



86.1k

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'));
}


27.6k

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