public function render($custom = null)
    {
        $messages = $this->toArray();

        if ( ! empty ($messages)) {
            $this->clearMessages();
            return $this->theme->render(
                $custom,
                ['messages' => $this->withDefaults($messages)],
                'alert'
            );
        }

        return '';
    }