PHP code example of epii / admin-ui-login

1. Go to this page and download the library: Download epii/admin-ui-login library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

epii / admin-ui-login example snippets


 AdminLogin::login(new class implements IloginConfig
        {
            public function onPost(string $username, string $password, &$msg): bool
            {

                // TODO: Implement onPost() method.
                $msg = "失败";
                return true;
            }


            public function getConfigs(): array
            {
                // TODO: Implement getConfigs() method.
                return ["success_url"=>"http://www.baidu.com"];

            }
        });


 [
        "title" => "后台登录",
        "success_url" => "",
        "bg_imgs" => [
            "http://103.131.168.58:8180/app/epii-static/imgs/login_imgs/login1.jpg",
            "http://103.131.168.58:8180/app/epii-static/imgs/login_imgs/login2.jpg",
            "http://103.131.168.58:8180/app/epii-static/imgs/login_imgs/login3.jpg",
            "http://103.131.168.58:8180/app/epii-static/imgs/login_imgs/login4.jpg"],
        "username_tip" => "用户名或电子邮件",
        "password_tip" => "密 码",
        "btn_msg"=>"登 录"

    ]