问题
Even if the views is available at the resources/views directory laravel is showing me this error
View [name] not found.
Everything was working fine until a token mismatch error occured currently i am not being able to access any view in the views directory.
Route::get('/', function () {
return view('welcome');
});//in web.php
is throwing View [welcome] not found. exception
NOTE I am running my application vagrant in homestead
回答1:
First of all check welcome
view exist in the resources/views
directory. After that run following command on terminal:
php artisan cache:clear
php artisan config:cache
and refresh the page.
Explanation: Laravel maintains cache to serve view, so you have to clear the cache.
回答2:
I was having this problem only when running the application on homestead server and i was able to solve this after i ran the
php artisan config:clear
command
回答3:
check your blade syntax, i just fix mine it was
@if
@component
@endif
@endcomponent
来源:https://stackoverflow.com/questions/42505607/laravel-5-4-view-name-not-found