i have a problem with routes, i have my route:
Route::get('dashboard/password', 'UserController@password');
Route::post('dashboard/updatepassword', 'UserController@updatePassword');
// PAGINA UTENTE PUBBLICA
Route::get('/{username}', 'FrontController@user');
// blog routes
Route::get('blog', 'FrontController@blog');
Route::get('blog/{slug}', 'FrontController@article');
Route::get('blog/category/{name}', 'FrontController@BlogCategory');
Route::get('blog/tag/{name}', 'FrontController@tags');
Route::resource('comment', 'CommentController');
and my FrontController:
public function blog()
{
$articles = Article::OrderBy('id','DESC')->paginate(3);
$Allarticles = Article::OrderBy('id','DESC')->get();
$Allcategories = BlogCategory::OrderBy('id','DESC')->get();
$Alltags = Tag::OrderBy('id','DESC')->get();
$Allcomments = Comment::OrderBy('id','DESC')->take(3)->get();
return view('blog', compact('articles','Alltags','Allarticles','Allcategories','Allcomments'));
}
if i go to "http://localhost:8000/blog" it return to page where i was before. similar to route->back().
I dont know why i have this problem, other blog routes work well.
I done some test like this:
public function blog()
{
return "Hi";
}
it doesnt return "Hi", so i think is a problem with the route. i have not anable middleware here, my other routes like blog/article work well.