PHP code example of maatify / failed-login-handler

1. Go to this page and download the library: Download maatify/failed-login-handler 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/ */

    

maatify / failed-login-handler example snippets



/**
 * Created by Maatify.dev
 * User: Maatify.dev
 * Date: 2024-01-13
 * Time: 09:36 AM
 * https://www.Maatify.dev
 */

namespace App\Assist;

use Maatify\Functions\GeneralFunctions;

class AppFunctions
{
    const pagination_limit = 10;

    public static function PortalUrl(): string
    {
        return GeneralFunctions::HostUrl() . 'portal/';
    }

    public static function SiteUrl(): string
    {
        return GeneralFunctions::HostUrl();
    }

    public static function HeaderMeta(string $title, string $description): void
    {
        echo '
        <meta name="description" content="' . $description . '">
        <meta property="og:title" content="' . $title . '" />
        <meta property="og:site_name" content="' . $title . '">
        <meta property="og:type" content="website" />
        <meta property="og:url" content="' . GeneralFunctions::CurrentUrl() . '">
        <meta property="og:image" content="' . GeneralFunctions::HostUrl() . 'images/logo.png" />
        <meta property="og:description" content="' . $description . '">
        <title>' . $title . '</title> 
            ';
    }

    public static function CurrentDateTime(): string
    {
        return date("Y-m-d H:i:s", time());
    }

    public static function CurrentTime(): string
    {
        return date("H:i:s", time());
    }

    public static function CurrentDate(): string
    {
        return date("Y-m-d", time());
    }

    public static function IP(): string
    {
        return GeneralFunctions::UserIp();
    }

    public static function DefaultDateTime(): string
    {
        return '1900-01-01 00:00:00';
    }

}