PHP code example of jhuliocastro / alertas

1. Go to this page and download the library: Download jhuliocastro/alertas 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/ */

    

jhuliocastro / alertas example snippets


#IMPORTE A CLASSE
use Alertas\Alert;

#MODO DE SUCESSO
Alert::success('Título', 'Mensagem', "Ação de Botão");

#MODO DE ERRO
Alert::error('Título', 'Mensagem', "Ação de Botão");

#MODO DE INFORMAÇÕES
Alert::info('Título', 'Mensagem', "Ação de Botão");

#MODO DE ATENÇÃO
Alert::warning('Título', 'Mensagem', "Ação de Botão");

#MODO DE PERGUNTA
Alert::question('Título', 'Mensagem', 'Ação de Botão (Sim)', 'Ação de Botão (Não)');

#NOVO MODO DE CRON
Alert::cron("Tipo", "Título", "Mensagem", "Ação de Botão", "Tempo para redirecionar");

O MODO CRON REDIRECIONA O USUÁRIO AUTOMATICAMENTE DE ACORDO COM O TEMPO DEFINIDO!
ELE ACEITA OS TIPOS "success", "info", "error" e "warning"

#MODO DE INPUT
Alert::input("Título", "TIPO DO INPUT", "Ação de Botão");

O INPUT ACEITA OS TIPOS 'text', 'password', 'email'