diff --git a/resources/views/admin/homepage/index.blade.php b/resources/views/admin/homepage/index.blade.php index 5f8620e..63a137e 100644 --- a/resources/views/admin/homepage/index.blade.php +++ b/resources/views/admin/homepage/index.blade.php @@ -5,9 +5,9 @@
- {{ explode(" - ", $inspiration)[0] }} + {{ $quote }} - {{ explode(" - ", $inspiration)[1] }} + {{ $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 ]); } }