Skip to content

Commit

Permalink
Merge pull request #40 from Aerochrome/fix/homepage-inspiration-quote
Browse files Browse the repository at this point in the history
Fixed Inspiration Quote On Default Homepage
  • Loading branch information
strstensky authored Sep 13, 2022
2 parents 331c04a + 1d9de78 commit d7d72d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resources/views/admin/homepage/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<div class="welcome-quote">

<blockquote>
{{ explode(" - ", $inspiration)[0] }}
{{ $quote }}
<cite>
{{ explode(" - ", $inspiration)[1] }}
{{ $quoteAuthor }}
</cite>
</blockquote>

Expand Down
7 changes: 6 additions & 1 deletion src/Http/Controllers/AdminHomepageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
]);
}
}

0 comments on commit d7d72d0

Please sign in to comment.