From 484ae0b1fa64e6158dd26736a953a5324122b0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=A4tsch?= Date: Mon, 12 Sep 2022 22:12:18 +0200 Subject: [PATCH 1/2] Fixes BRACKETS-by-TRIAD/craftable#402 --- resources/views/admin/homepage/index.blade.php | 12 ++++++------ src/Http/Controllers/AdminHomepageController.php | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/resources/views/admin/homepage/index.blade.php b/resources/views/admin/homepage/index.blade.php index 5f8620e..1ac105e 100644 --- a/resources/views/admin/homepage/index.blade.php +++ b/resources/views/admin/homepage/index.blade.php @@ -4,12 +4,12 @@
-
- {{ explode(" - ", $inspiration)[0] }} - - {{ explode(" - ", $inspiration)[1] }} - -
+
+ {{ $quote }} + + {{ $quoteAuthor }} + +
diff --git a/src/Http/Controllers/AdminHomepageController.php b/src/Http/Controllers/AdminHomepageController.php index 4409716..0117e0d 100644 --- a/src/Http/Controllers/AdminHomepageController.php +++ b/src/Http/Controllers/AdminHomepageController.php @@ -15,8 +15,13 @@ class AdminHomepageController extends Controller */ public function index() { + $inspiringQuote = Inspiring::quotes()->random(); + + [$quote, $quoteAuthor] = explode(' - ', $inspiringQuote); + return view('brackets/admin-auth::admin.homepage.index', [ - 'inspiration' => Inspiring::quote() + 'quote' => $quote, + 'quoteAuthor' => $quoteAuthor ]); } } From 1d9de789a4ec6920aaf3c505a02954c253834322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=A4tsch?= Date: Mon, 12 Sep 2022 22:18:23 +0200 Subject: [PATCH 2/2] Corrected indentation --- resources/views/admin/homepage/index.blade.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/admin/homepage/index.blade.php b/resources/views/admin/homepage/index.blade.php index 1ac105e..63a137e 100644 --- a/resources/views/admin/homepage/index.blade.php +++ b/resources/views/admin/homepage/index.blade.php @@ -4,12 +4,12 @@
-
- {{ $quote }} - - {{ $quoteAuthor }} - -
+
+ {{ $quote }} + + {{ $quoteAuthor }} + +