Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.4 View [name] not found

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

like image 278
Selvesan Malakar Avatar asked Jan 05 '23 10:01

Selvesan Malakar


2 Answers

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

like image 159
Selvesan Malakar Avatar answered Jan 07 '23 00:01

Selvesan Malakar


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.

like image 29
Mayank Pandeyz Avatar answered Jan 06 '23 23:01

Mayank Pandeyz