41 lines
1011 B
PHP
41 lines
1011 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Session;
|
|
|
|
function tw_max_width_class_array() :Array {
|
|
$return = [
|
|
"xs" => "max-w-xs",
|
|
'sm' => 'max-w-sm',
|
|
'md' => 'max-w-md',
|
|
'lg' => 'max-w-lg',
|
|
'xl' => 'max-w-xl',
|
|
'2xl' => 'max-w-2xl',
|
|
'3xl' => 'max-w-3xl',
|
|
'4xl' => 'max-w-4xl',
|
|
'5xl' => 'max-w-5xl',
|
|
'6xl' => 'max-w-6xl',
|
|
'7xl' => 'max-w-7xl',
|
|
'full' => 'max-w-full',
|
|
'fit' => 'max-w-fit',
|
|
'min' => 'max-w-min',
|
|
'max' => 'max-w-max',
|
|
];
|
|
return $return;
|
|
}
|
|
|
|
function getMessages() {
|
|
$flash = Session::get('_flash');
|
|
$messages = $flash['new'];
|
|
$return = [];
|
|
foreach ($messages as $message) {
|
|
if (substr($message, 0,4) != 'msg|') continue;
|
|
$type = Session::get($message);
|
|
$return[] = ['message' => substr($message,4), 'type' => $type];
|
|
}
|
|
return $return;
|
|
}
|
|
|
|
function sendMessage(String $message, String $type) {
|
|
Session::flash('msg|'.$message,$type);
|
|
}
|