PHP Classes

File: issues/14/create_msg.php

Recommend this page to a friend!
  Classes of Yuriy Tkachenko   Simple Flash Messages   issues/14/create_msg.php   Download  
File: issues/14/create_msg.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple Flash Messages
Display message with different CSS frameworks
Author: By
Last change: Fix issues from CI
Date: 1 year ago
Size: 381 bytes
 

Contents

Class file image Download
<?php

use Tamtamchik\SimpleFlash\Exceptions\FlashTemplateNotFoundException;
use function
Tamtamchik\SimpleFlash\flash;

if ( !
session_id()) {
   
session_start();
}

require_once(
'../../vendor/autoload.php');

try {
   
flash()->message('This is a info message with TailwindCSS');
} catch (
FlashTemplateNotFoundException $e) {
   
// No one cares
}

header('Location: msg.php');