public function config($key = null, $default = null)
{
// Version 5.1
if (!$this->config) {
$this->config = $this->app['config'][$this->package];
}
// Version 4.2
//if (!$this->config) $this->config = $this->app['config'][$this->package.'::config'];
if ($key === null) {
return $this->config;
}
if (array_key_exists($key, $this->config)) {
return $this->config[$key];
}
return $default;
}