Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Topherr's avatar

Views Not Found

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('/', 'PagesController@index');
            Route::get('/about', 'PagesController@about');
            Route::get('/contact', 'PagesController@contact');
            Route::get('/home', 'HomeController@index')->name('home');

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

0 likes
20 replies
nlagdhir's avatar

Have you tried after clear config.

php artisan config:clear
1 like
Topherr's avatar

@nlagdhir yes I have and it had no effect

@DarkRoast list provides this

            GET|HEAD| login| login| App\Http\Controllers\Auth\LoginController@showLoginForm| web,guest|
            POST    | login|| App\Http\Controllers\Auth\LoginController@login|web,guest|

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

tykus's avatar

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

tykus's avatar

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

Topherr's avatar

@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's avatar

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

1 like
nlagdhir's avatar

@Topherr Have you check all other routes working fine?

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

nlagdhir's avatar

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
1 like
Topherr's avatar

@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's avatar

Have you run composer dump-autoload after?

Maybe try composer update too.

Topherr's avatar

@nlagdhir yes I have and everything is still broken and now there is not config file in the bootstrap folder

Topherr's avatar

Okay I have created a completley fresh project on the server and I still get this error of auth.login and auth.register not found, does anyone have any ideas how to resolve this issue?

mariok's avatar

Can you check do you have all pre-requirements for Laravel 5.5 on your server?

PHP >= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Vijay's avatar

Try this:

php artisan clear-compiled

Please or to participate in this conversation.