| @@ 78-93 (lines=16) @@ | ||
| 75 | } |
|
| 76 | } |
|
| 77 | ||
| 78 | if (!function_exists('admin_toastr')) { |
|
| 79 | ||
| 80 | /** |
|
| 81 | * Flash a toastr message bag to session. |
|
| 82 | * |
|
| 83 | * @param string $message |
|
| 84 | * @param string $type |
|
| 85 | * @param array $options |
|
| 86 | */ |
|
| 87 | function admin_toastr($message = '', $type = 'success', $options = []) |
|
| 88 | { |
|
| 89 | $toastr = new MessageBag(get_defined_vars()); |
|
| 90 | ||
| 91 | session()->flash('toastr', $toastr); |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||
| 95 | if (!function_exists('admin_success')) { |
|
| 96 | ||
| @@ 137-152 (lines=16) @@ | ||
| 134 | } |
|
| 135 | } |
|
| 136 | ||
| 137 | if (!function_exists('admin_info')) { |
|
| 138 | ||
| 139 | /** |
|
| 140 | * Flash a message bag to session. |
|
| 141 | * |
|
| 142 | * @param string $title |
|
| 143 | * @param string $message |
|
| 144 | * @param string $type |
|
| 145 | */ |
|
| 146 | function admin_info($title, $message = '', $type = 'info') |
|
| 147 | { |
|
| 148 | $message = new MessageBag(get_defined_vars()); |
|
| 149 | ||
| 150 | session()->flash($type, $message); |
|
| 151 | } |
|
| 152 | } |
|
| 153 | ||
| 154 | if (!function_exists('admin_asset')) { |
|
| 155 | ||