<?php
namespace App\Controllers;

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

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

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

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