diff --git a/src/LaravelNotify.php b/src/LaravelNotify.php index 1407bdc..84ba943 100644 --- a/src/LaravelNotify.php +++ b/src/LaravelNotify.php @@ -108,6 +108,20 @@ public function smiley(string $type, string $message) : LaravelNotify return $this; } + /** + * Return a smiley notify + * + * @param string $type + * @param string $message + * @return $this + */ + public function emotify(string $type, string $message) : LaravelNotify + { + $this->flash($message, $type, null, 'emotify'); + + return $this; + } + /** * Return a drake notify * @@ -128,9 +142,9 @@ public function drake(string $type) : LaravelNotify * Flash a message. * * @param string $message - * @param string $type - * @param string $icon - * @param string $model + * @param string|null $type + * @param string|null $icon + * @param string|null $model * @param string|null $title * * @return void diff --git a/src/helpers.php b/src/helpers.php index 18f931a..def5bb7 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -66,6 +66,21 @@ function smilify(string $type, string $message) return $notify; } } +if (! function_exists('emotify')) { + /** + * Smilify + * + * @param string $type + * @param string|null $message + * @return \Mckenziearts\Notify\LaravelNotify + */ + function emotify(string $type, string $message) + { + $notify = app('notify')->emotify($type, $message); + + return $notify; + } +} if (! function_exists('notifyJs')) { /**