php-mvc
php-mvc copied to clipboard
Controller for base.html
Please tell me I want to create a controller for base.html
namespace App\Controllers;
use \Core\View;
class Base extends \Core\Controller
{
public function indexAction()
{
View::renderTemplate('base.html', ['tmp' => 'test']);
}
}
This is required in order to display for example a menu
I'm afraid I'm not quite sure what you mean - you want to be able to display the base.html view if you go to example.com/base/index ? Please can you give me more details?