Laravel 5.4 View [name] not found
Asked Answered
G

5

6

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

Gere answered 28/2, 2017 at 10:2 Comment(4)
i hope welcome file is not in a folderAlleluia
welcome.blade.php is available in the folder resources/viewsGere
delete all the files in storage\framework\cache, storage\framework\session and storage\framework\veiws and try againAlleluia
can you send a photo of your view folder???Mossbunker
G
5

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

Gere answered 28/2, 2017 at 10:19 Comment(0)
R
4

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.

Resurrectionist answered 28/2, 2017 at 10:4 Comment(2)
the view "welcome.blade.php" does exists in the resources/views directory and i have also tried the cache clear command this does not fix my problemGere
the view "welcome.blade.php" does exists in the resources/views directory then make it.Resurrectionist
G
0

check your blade syntax, i just fix mine it was

@if
@component
@endif
@endcomponent
Grayish answered 24/6, 2019 at 7:19 Comment(0)
O
0

I had the same issue on the server. The cause was folders inside the view folder has no executable permission. After giving permission to those folders everything works fine.

Ordovician answered 12/8, 2020 at 10:4 Comment(0)
T
0

none of above answers helped me. Heres what i did. The issue is that laravel cant find new route provided by your in web.php because it is using it from cached routes. So try running this command

php artisan route:cache

This will clear routes cache Hopefully this will solve your issue

Thyestes answered 22/3 at 10:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.