protected function setViewData($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $name => $data) {
                view()->share($name, $data);
            }
        } else {
            view()->share($key, $value);
        }
    }