There is a 404 NOT FOUND at web.php for navbar.blade.php:
<li class="{{Request::is('home') ? 'active' : ''}}"><a href="{{ route('home')}}">Home</a></li>
<li class="{{Request::is('about') ? 'active' : ''}}"><a href="{{ route('about')}}">About</a></li>
<li class="{{Request::is('contact') ? 'active' : ''}}"><a href="{{ route('contact')}}">Contact</a></li>
web.php:
Route::get('/home', 'PagesController@getHome')->name('home');;
Route::get('/about', 'PagesController@getAbout')->name('about');;
Route::get('/contact', 'PagesController@getContact')->name('contact');
Route::get('/messages', 'MessagesController@getMessages')->name('messages');
Route::post('/contact/submit', 'MessagesController@submit')->name('submit');
PagesController.php:
class PagesController extends Controller
{
public function getHome(){
return view('home');
}
public function getAbout(){
return view('about');
}
public function getContact(){
return view('contact');
}
}
Running commands like:
composer dumpautoload && php artisan view:clear && php artisan cache:clear && php artisan route:clear && php artisan config:clear
Even if is declare at web.php the routes can not be found.