public function activate($name)
{
$theme = Theme::get($name);
try {
Configuration::create(['website_id' => $this->defaultWebsiteId, 'configuration_key' => 'active_theme_identifier', 'configuration_value' => $name]);
Configuration::create(['website_id' => $this->defaultWebsiteId, 'configuration_key' => 'active_theme_path', 'configuration_value' => $theme['path']]);
Artisan::call('vendor:publish', ['--tag' => $name]);
} catch (Exception $e) {
throw new Exception($e->getMessage());
}
return redirect()->route('admin.theme.index');
}