Explorar el Código

fix pubblicazione se non pubblicato

FabioFratini hace 1 año
padre
commit
77806b7396
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      routes/web.php

+ 1 - 1
routes/web.php

@@ -3339,7 +3339,7 @@ Route::get('/{slug}', function ($slug) {
     $page = Page::where('slug', '=', $slug)->first();
     if ($page != null)
     {
-        $news = News::where('page_id', '=', $page->id)->orderBy('date', 'DESC')->first();
+        $news = News::where('page_id', '=', $page->id)->where('online', '=', true)->orderBy('date', 'DESC')->first();
 
         $aImages = array();
         if ($news)