An example project to showcase Vistas workflow.
views/layouts/main-layout.php
:
views/home.php
:
public/index.php
:
include('sidebar', ['menu' => ['Home', 'About', 'Contact']])
method passes a menu variable to the sidebar.php
view.
Inside sidebar.php
, the $menu
array will be accessible.