public function clear(string $type = null): FlashBag
    {
        if (is_null($type)) {
            $this->messages = [];
        } else {
            if (isset($this->messages[$type])) {
                unset($this->messages[$type]);
            }
        }

        // Save into session
        $this->saveToSession();

        return $this;
    }