Commit f5c8ea14c511230f1bfb68b64b77b3b4601a7b58

Authored by Alex Savenko
1 parent adb2da98

test new routing with var

app/library/App/Bootstrap/RouteBootstrap.php
@@ -45,7 +45,11 @@ class RouteBootstrap implements BootstrapInterface @@ -45,7 +45,11 @@ class RouteBootstrap implements BootstrapInterface
45 /** @var \Phalcon\Mvc\View\Simple $view */ 45 /** @var \Phalcon\Mvc\View\Simple $view */
46 $view = $api->di->get(Services::VIEW); 46 $view = $api->di->get(Services::VIEW);
47 47
48 - return $view->render('general/test'); 48 + $msg = "testing fine";
  49 +
  50 + return $view->render('general/test', [
  51 + 'var1' => $msg
  52 + ]);
49 }); 53 });
50 } 54 }
51 } 55 }
52 \ No newline at end of file 56 \ No newline at end of file
app/views/general/test.phtml
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 <path fill="#81bb5e" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M7,11L4,8l1.5-1.5L7,8l3.5-3.5L12,6L7,11z"/> 43 <path fill="#81bb5e" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M7,11L4,8l1.5-1.5L7,8l3.5-3.5L12,6L7,11z"/>
44 </svg> 44 </svg>
45 </a> 45 </a>
46 - <h1>It is testing.</h1> 46 + <h1>It is <?= $var1; ?>.</h1>
47 </div> 47 </div>
48 </body> 48 </body>
49 </html> 49 </html>
50 \ No newline at end of file 50 \ No newline at end of file