Skip to content

Commit

Permalink
blog route updated
Browse files Browse the repository at this point in the history
blog route updated
  • Loading branch information
codephics committed Aug 17, 2024
1 parent a9962ec commit 03bf65d
Show file tree
Hide file tree
Showing 3 changed files with 7 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 blogs()
public function blog()
{
$page = Page::where('slug', 'more-blogs')->firstOrFail();
$page = Page::where('slug', 'blog')->firstOrFail();
$setting = Setting::first();
$blogs = Blog::all();

Expand Down
3 changes: 3 additions & 0 deletions resources/views/backend/global/page/manage-pages.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<th>SN</th>
<th>Name</th>
<th>Title</th>
<th>Slug</th>
<th>Status</th>
<th>Action</th>
</tr>
Expand All @@ -93,6 +94,7 @@
<td>{{ $index + 1 }}</td>
<td>{{ $page->name }}</td>
<td>{{ $page->title }}</td>
<td>{{ $page->slug }}</td>
<td>@if($page->status == 1) Live @else Draft @endif</td>
<td>
<div class="btn-group" role="group" aria-label="Basic mixed styles example">
Expand Down Expand Up @@ -132,6 +134,7 @@
<th>SN</th>
<th>Name</th>
<th>Title</th>
<th>Slug</th>
<th>Status</th>
<th>Action</th>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
|--------------------------------------------------------------------------
*/

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

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 03bf65d

Please sign in to comment.