php-mvc icon indicating copy to clipboard operation
php-mvc copied to clipboard

Controller for base.html

Open Andrylomakin opened this issue 4 years ago • 1 comments

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

Andrylomakin avatar Jan 25 '21 18:01 Andrylomakin

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?

daveh avatar Jan 25 '21 18:01 daveh