src/Admin/AdminController.php
public function getIndex()
    {
        $this->di->get("auth")->isAdmin(true);

        $user = new User();
        $user->setDb($this->di->get("db"));

        $title      = "Min sida";
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");


        $data = [
            "title" => $title,
            "users" => $user->findAll(),
        ];

        $view->add("admin/index", $data);

        $pageRender->renderPage(["title" => $title]);
    }
public function getIndex()
    {
        $this->di->get("auth")->isAdmin(true);

        $user = new User();
        $user->setDb($this->di->get("db"));

        $title      = "Min sida";
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");


        $data = [
            "title" => $title,
            "users" => $user->findAll(),
        ];

        $view->add("admin/index", $data);

        $pageRender->renderPage(["title" => $title]);
    }
public function getIndex ( ) { $ this -> di -> get ( "auth" ) -> isAdmin ( true ) ; $ user = new User ( ) ; $ user -> setDb ( $ this -> di -> get ( "db" ) ) ; $ title = "Min sida" ; $ view = $ this -> di -> get ( "view" ) ; $ pageRender = $ this -> di -> get ( "pageRender" ) ; $ data = [ "title" => $ title , "users" => $ user -> findAll ( ) , ] ; $ view -> add ( "admin/index" , $ data ) ; $ pageRender -> renderPage ( [ "title" => $ title ] ) ; }
Get the Admin indexpage.

@throws Exception

@return void
Get the Admin indexpage .