Welcome Guest, Not a member yet? Register   Sign In
View string needs escape if back slash on end
#16

I have also the same issue when I followed the tutorial from the official documentation. After I create the Controller, Model and Views for "News" from the tutorial and tried to make it in module. And following the documentation and the above threads, the code for calling view seems quite confuse. Just want to know it there a better way to render the view when sub-directory view and module views are used in the Controller.

PHP Code:
        $data = [
            'news'  => $model->getNews(),
            'title' => 'News archive',
        ];

        echo view('templates/header'$data);
        echo view('News\Views\overview'$data);
        echo view('templates/footer'); 

Folder structure

   
Reply


Messages In This Thread
RE: View string needs escape if back slash on end - by charlesng0209 - 12-28-2019, 10:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB