Skip to content

Commit c5646a6

Browse files
committed
FIX: Issues with view paths
1 parent e62c500 commit c5646a6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

routes/web.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
Route::resource('categories', 'CategoryController');
77
});
88

9-
Route::get('posts/{post}', 'PostController@show')->name('posts.show');
9+
Route::group(['middleware' => 'web'], function () {
10+
Route::get('posts/{post}', 'PostController@show')->name('posts.show');
11+
});

src/Controllers/PostController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function index()
3535
->orderBy('created_at', 'desc')
3636
->paginate(10);
3737

38-
return view('admin.posts.posts', compact('posts'));
38+
return view('blog.admin.posts.posts', compact('posts'));
3939
}
4040

4141
/**
@@ -47,7 +47,7 @@ public function create()
4747
{
4848
$post = new Post;
4949

50-
return view('admin.posts.post', [
50+
return view('blog.admin.posts.post', [
5151
'post' => $post,
5252
'categories' => Category::all(),
5353
'tags' => Tag::all(),
@@ -107,7 +107,7 @@ public function edit(Post $post)
107107
{
108108
$post->load('category', 'tags');
109109

110-
return view('admin.posts.post', [
110+
return view('blog.admin.posts.post', [
111111
'post' => $post,
112112
'categories' => Category::all(),
113113
'tags' => Tag::all(),

0 commit comments

Comments
 (0)