| @@ 87-102 (lines=16) @@ | ||
| 84 | } |
|
| 85 | } |
|
| 86 | ||
| 87 | if (!function_exists('admin_toastr')) { |
|
| 88 | ||
| 89 | /** |
|
| 90 | * Flash a toastr message bag to session. |
|
| 91 | * |
|
| 92 | * @param string $message |
|
| 93 | * @param string $type |
|
| 94 | * @param array $options |
|
| 95 | */ |
|
| 96 | function admin_toastr($message = '', $type = 'success', $options = []) |
|
| 97 | { |
|
| 98 | $toastr = new MessageBag(get_defined_vars()); |
|
| 99 | ||
| 100 | session()->flash('toastr', $toastr); |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||
| 104 | if (!function_exists('admin_success')) { |
|
| 105 | ||
| @@ 146-161 (lines=16) @@ | ||
| 143 | } |
|
| 144 | } |
|
| 145 | ||
| 146 | if (!function_exists('admin_info')) { |
|
| 147 | ||
| 148 | /** |
|
| 149 | * Flash a message bag to session. |
|
| 150 | * |
|
| 151 | * @param string $title |
|
| 152 | * @param string $message |
|
| 153 | * @param string $type |
|
| 154 | */ |
|
| 155 | function admin_info($title, $message = '', $type = 'info') |
|
| 156 | { |
|
| 157 | $message = new MessageBag(get_defined_vars()); |
|
| 158 | ||
| 159 | session()->flash($type, $message); |
|
| 160 | } |
|
| 161 | } |
|
| 162 | ||
| 163 | if (!function_exists('admin_asset')) { |
|
| 164 | ||