$type, 'title' => $title, 'description' => $description, 'position' => $position, 'icon' => Blade::render(""), 'css' => $css, 'timeout' => $timeout, ]; $this->js('toast('.json_encode(['toast' => $toast]).')'); if ($redirectTo) { return $this->redirect($redirectTo, navigate: true); } } public function success( string $title, ?string $description = null, ?string $position = null, string $icon = 'o-check-circle', string $css = 'alert-success', int $timeout = 3000, ?string $redirectTo = null ) { return $this->toast('success', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } public function warning( string $title, ?string $description = null, ?string $position = null, string $icon = 'o-exclamation-triangle', string $css = 'alert-warning', int $timeout = 3000, ?string $redirectTo = null ) { return $this->toast('warning', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } public function error( string $title, ?string $description = null, ?string $position = null, string $icon = 'o-x-circle', string $css = 'alert-error', int $timeout = 3000, ?string $redirectTo = null ) { return $this->toast('error', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } public function info( string $title, ?string $description = null, ?string $position = null, string $icon = 'o-information-circle', string $css = 'alert-info', int $timeout = 3000, ?string $redirectTo = null ) { return $this->toast('info', $title, $description, $position, $icon, $css, $timeout, $redirectTo); } }