Esempio n. 1
0
 /**
  * Dump the passed variables and continue the script.
  *
  * @param  mixed
  * @return void
  */
 function isSetViewConfigReturnValue($key, $value, $pRetval)
 {
     //request()->session()->forget($key);
     //geen sessie set default
     if (request()->session()->has($key)) {
         $retval = $value == \App\Sitemap::getViewConfigValue($key);
         return $retval ? $pRetval[0] : $pRetval[1];
     } elseif (isset($pRetval[2]) && $pRetval[2] == 'default') {
         return $pRetval[0];
     }
 }
Esempio n. 2
0
 public function anyGenerate()
 {
     $sitemap = App::make("sitemap");
     $arr = $this->addLoc();
     $sitemapFix = Sitemap::get();
     if ($sitemapFix) {
         foreach ($sitemapFix as $sm) {
             $modified = isset($arr[$sm->loc]) ? $arr[$sm->loc]['modified'] : $sm->lastmod;
             $arr[$sm->loc] = ['priority' => $sm->priority, 'modified' => $modified, 'freq' => $sm->changefreq];
             if (!$sm->in_sitemap) {
                 unset($arr[$sm->loc]);
             }
         }
     }
     foreach ($arr as $key => $val) {
         $sitemap->add(url($key), $val['modified'], $val['priority'], $val['freq']);
     }
     // generate your sitemap (format, filename)
     return $sitemap->render('xml');
 }