https://github.com/jhuliocastro/sweet-alert
SWEET ALERT 100% EM PHP
https://github.com/jhuliocastro/sweet-alert
alert alerta alertas php sweetalert sweetalert2
Last synced: 4 months ago
JSON representation
SWEET ALERT 100% EM PHP
- Host: GitHub
- URL: https://github.com/jhuliocastro/sweet-alert
- Owner: jhuliocastro
- Created: 2021-03-02T18:31:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-26T18:32:41.000Z (almost 5 years ago)
- Last Synced: 2025-12-14T06:41:51.847Z (7 months ago)
- Topics: alert, alerta, alertas, php, sweetalert, sweetalert2
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sweet Alert PHP
```bash
composer require jhuliocastro/sweet-alert
```
## Utilização
```php
#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'
```
```
```