Skip to content

Commit

Permalink
Blog Route Improved
Browse files Browse the repository at this point in the history
Blog Route Improved
  • Loading branch information
codephics committed Aug 15, 2024
1 parent 3a3287f commit 6628a9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Global/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public function shop()
]);
}

public function blog()
public function blogs()
{
$page = Page::where('slug', 'blog')->firstOrFail();
$page = Page::where('slug', 'more-blogs')->firstOrFail();
$setting = Setting::first();
$blogs = Blog::all();

Expand Down
2 changes: 1 addition & 1 deletion resources/views/frontend/blog/more.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ route('front.home') }}">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Blog</li>
<li class="breadcrumb-item active" aria-current="page">More Blog</li>
</ol>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
|--------------------------------------------------------------------------
*/

Route::get('blog', [PageController::class, 'blog'])->name('blog.more');
Route::get('blog', [PageController::class, 'blogs'])->name('blog.more');
Route::get('blog/{slug}', [PageController::class, 'detail'])->name('blog.detail');

/*
Expand Down

0 comments on commit 6628a9e

Please sign in to comment.