<?php
namespace App\Controllers;

require_once BASE_PATH . '/app/helpers/permissions.php';

use App\Core\Controller;
use App\Core\Database;

final class PermissionController extends Controller
{
    public function index()
    {
        \App\Middleware\RoleGuard::allow(['superadmin']);

        $db = Database::getInstance();
        $rows = $db->query("SELECT * FROM permissions")->fetchAll();

        $this->view('superadmin/permissions', compact('rows'));
    }
}
