diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c638a5c9..e37a24c5 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,6 +4,7 @@
+
@@ -33,7 +34,28 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -130,7 +152,6 @@
-
@@ -142,6 +163,7 @@
+
@@ -290,6 +312,8 @@
+
+
@@ -302,10 +326,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
@@ -529,6 +619,7 @@
+
1544558297103
@@ -877,7 +968,7 @@
-
+
@@ -890,17 +981,19 @@
+
-
-
-
+
-
+
+
+
+
@@ -908,7 +1001,6 @@
-
@@ -999,13 +1091,6 @@
-
-
-
-
-
-
-
@@ -1195,13 +1280,6 @@
-
-
-
-
-
-
-
@@ -1272,7 +1350,6 @@
-
@@ -1332,14 +1409,6 @@
-
-
-
-
-
-
-
-
@@ -1347,6 +1416,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/Http/Controllers/LandingController.php b/app/Http/Controllers/LandingController.php
index e6d730b1..652df35f 100644
--- a/app/Http/Controllers/LandingController.php
+++ b/app/Http/Controllers/LandingController.php
@@ -18,17 +18,18 @@ class LandingController extends ExtendedController
public function index(Request $request)
{
$model = Post::select('*')
- ->isPublished()
// ->withImages()
// Einsätze und Berichte werden nur angezeigt wenn sie von heute oder älter sind
->where(function($query){
$query->whereIn('type', ['einsatz', 'bericht'])
- ->where('datetime', '<=', Carbon::now()->addWeeks(2));
+ ->where('datetime', '<=', Carbon::now()->addWeeks(2))
+ ->isPublished();
})
// Veranstaltungen werden nur angezeigt, wenn sie zwischen heute und 2 Wochen in der Zukunft sind
->orWhere(function($query){
$query->whereIn('type', ['veranstaltung'])
- ->whereBetween('datetime', [Carbon::now(), Carbon::now()->addWeeks(2)]);
+ ->whereBetween('datetime', [Carbon::now(), Carbon::now()->addWeeks(2)])
+ ->isPublished();
})
// ->whereIn('type', ['einsatz', 'veranstaltung', 'bericht'])
// ->where('datetime', '<=', Carbon::now()->addWeeks(2))