academy01/semej

Simple package to show alert messages using session

v1.0.0.x-dev 2023-07-20 16:51 UTC

This package is auto-updated.

Last update: 2024-09-20 19:40:21 UTC


README

show alert messages using easily using Semej

Installation

Install package using composer:

composer require academy01/semej

then add autoload

require 'vendor/autoload.php';

OR, just include Semej.php file in to your document and Enjoy!

include_once "dist/Semej.php";

Usage

Set arguments (Status, Title, Body)

Semej::set('false', 'Error 404', 'File Not Found!');

print status

Semej::status();

print title

Semej::title();

print Body

Semej::message();

delete session

Semej::unset();

print complete alert

this method require to bootstrap CDN included! with this method you can show the full alert message in your document. in the method, valid status value is on of These: info primary danger dark warning success secondary light

// set message like this
Semej::set('danger', 'error', 'file not found!');

// and show message like this
Semej::show();

alert message using sweet alert

this method require to sweetalert js cdn included! with thie method you can alert the body of message in your document.

Semej::alert();