Explorar o código

fix pubblicazione se non pubblicato

FabioFratini hai 1 ano
pai
achega
77806b7396
Modificáronse 1 ficheiros con 1 adicións e 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)