Views Not Found

Published 2 weeks ago by Topherr

Hello,

I am having an issue where I just started a new project on a server and I used the php artisan make:auth command like I have numerious times before. However now when I click the default made login or register links in the navbar, I get an error of

            InvalidArgumentException
            View [auth.login] not found.

My Routes file is as follows:-

            Auth::routes();

            Route::get('/', '[email protected]');
            Route::get('/about', '[email protected]');
            Route::get('/contact', '[email protected]');
            Route::get('/home', '[email protected]')->name('home');

I have done this numerous times before and never had any issue, but I cant seem to figure out whats causing this?

nlagdhir

Have you tried after clear config.

php artisan config:clear
DarkRoast

What does php artisan route:list show you?

Topherr

@nlagdhir yes I have and it had no effect

@DarkRoast list provides this

            GET|HEAD| login| login| App\Http\Controllers\Auth\[email protected]| web,guest|
            POST    | login|| App\Http\Controllers\Auth\[email protected]|web,guest|

These are only related to login, didnt want to post a wall of text for the entire return

tykus
tykus
2 weeks ago (432,930 XP)

Did the make:auth command create the necessary views inside resources/views/auth?

Topherr

@tykus yeah all the views are in the correct place

nlagdhir

@Topherr : Check in your view directory. all view files are generated or not.

Also check this

https://laracasts.com/discuss/channels/laravel/l51-view-authlogin-not-found-problem-with-path-of-storage

Hope this will help you.

tykus
tykus
2 weeks ago (432,930 XP)

Have you made any changes to the default view config app/config/view.php?

Topherr

@tykus I am using Laravel 5.5 and in my app folder there is no config/view.php, I guess you the config/view.php is the samething?. In the config/view.php I have changed nothing at all.

nlagdhir

If you have copy project from somewhere then you need to rename/remove config.php to config.php_ from bootstrap/cache directory.

Topherr

@nlagdhir this is an new project, nothing has been copied from another

nlagdhir

@Topherr Have you check all other routes working fine?

Are you getting this problem in only this route or in all routes?

Topherr

@nlagdhir All other routes that are in the about route file work fine

nlagdhir

Give try all this once may it will help you

  1. php artisan cache:clear
  2. php artisan view:clear
  3. php artisan config:cache
  4. rename config file if present in bootstrap/cache/
  5. give permission 777 to bootstrap and storage
Topherr

@nlagdhir that just broke everything

Now I get this error file_put_contents(C:\Users\MainUser\PhpstormProjects\Demonstrator-Project\storage\framework/sessions/o8ZTqE3yQOvPsxYqQRPXxE24xBY87NT1yaUXmMiZ): failed to open stream: No such file or directory

nlagdhir

Have you run composer dump-autoload after?

Maybe try composer update too.

Please sign in or create an account to participate in this conversation.