'commented out routes are rendering views
i have all my routes commented out and its somehow rendering.
// dd("hi");
// return view('posts', [
// 'posts' => Post::all(),
// 'categories' => Category::all()
// ]);
// });
// Route::get('/posts/{post:slug}', function(Post $post) {
// return view('post', [
// 'post' => $post,
// ]);
// });
// Route::get('/categories/{category:slug}', function(Category $category) {
// return view('posts', [
// 'posts' => $category->posts
// ]);
// });
// Route::get('/authors/{author:username}', function(User $author) {
// return view('posts', [
// 'posts' => $author-[enter link description here][1]>posts
// ]);
// });
I was having trouble starting up my server php artisan serve so i had to run composer update and now something is messed up. video for reference
Solution 1:[1]
Try a php artisan route:clear followed by a php artisan route:cache did the trick. Thanks simon K
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Marcos Gonzales |
