Last active
February 22, 2020 07:54
-
-
Save rizkhal/69eb801cb099145004528a58c64397dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (! function_exists('notice')) { | |
function notice($type, $content) { | |
$notices = session()->get('notice'); | |
if(! is_array( $notices )) | |
$notices = []; | |
array_push($notices, [ | |
'type' => $type, | |
'content' => $content | |
]); | |
session()->put('notice', $notices); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment