From 31a3e120c9c95443d29c0603300ae656436a1bea Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Tue, 11 Jun 2024 10:31:43 +0200 Subject: [PATCH] wip --- app/Http/Controllers/InsightsController.php | 4 ++-- resources/views/front/pages/insights/index.blade.php | 4 ++-- .../insights/partials/externalFeedItems.blade.php | 11 +++++++++++ .../pages/insights/partials/insightListItem.blade.php | 11 ----------- 4 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 resources/views/front/pages/insights/partials/externalFeedItems.blade.php delete mode 100644 resources/views/front/pages/insights/partials/insightListItem.blade.php diff --git a/app/Http/Controllers/InsightsController.php b/app/Http/Controllers/InsightsController.php index a51e041c..ec9963c3 100644 --- a/app/Http/Controllers/InsightsController.php +++ b/app/Http/Controllers/InsightsController.php @@ -18,7 +18,7 @@ public function index() unset($posts[0]); } - $insights = ExternalFeedItem::query() + $externalFeedItems = ExternalFeedItem::query() ->orderBy('created_at', 'desc') ->limit(6) ->get(); @@ -26,7 +26,7 @@ public function index() return view('front.pages.insights.index', [ 'posts' => $posts, 'firstPost' => $firstPost ?? null, - 'insights' => $insights, + 'externalFeedItems' => $externalFeedItems, ]); } diff --git a/resources/views/front/pages/insights/index.blade.php b/resources/views/front/pages/insights/index.blade.php index 4edbcad6..375a5323 100644 --- a/resources/views/front/pages/insights/index.blade.php +++ b/resources/views/front/pages/insights/index.blade.php @@ -32,8 +32,8 @@ From our team & products - @foreach($insights as $insight) - @include('front.pages.insights.partials.insightListItem') + @foreach($externalFeedItems as $externalFeedItem) + @include('front.pages.insights.partials.externalFeedItems') @endforeach diff --git a/resources/views/front/pages/insights/partials/externalFeedItems.blade.php b/resources/views/front/pages/insights/partials/externalFeedItems.blade.php new file mode 100644 index 00000000..a2eca7bd --- /dev/null +++ b/resources/views/front/pages/insights/partials/externalFeedItems.blade.php @@ -0,0 +1,11 @@ +
+ + {{ $externalFeedItem->title }} + +
+ {{ $externalFeedItem->website }} + +
+
+
diff --git a/resources/views/front/pages/insights/partials/insightListItem.blade.php b/resources/views/front/pages/insights/partials/insightListItem.blade.php deleted file mode 100644 index c4d40e2f..00000000 --- a/resources/views/front/pages/insights/partials/insightListItem.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -
- - {{ $insight->title }} - -
- {{ $insight->website }} - -
-
-