This repository has been archived on 2024-03-08. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
website-old/storage/framework/Router.php
2022-12-05 23:00:28 +01:00

14 lines
No EOL
347 B
PHP

<?php
namespace framework;
// extends Router class to add custom methods
class Router extends \Bramus\Router\Router
{
public function view(string $path, string $view, string $activeTab = null): void
{
$this->get($path, function () use ($activeTab, $view) {
echo view($view, ['tab' => $activeTab]);
});
}
}