LennieCodes
LennieCodes

Reputation: 843

View [emails.password] not found in Laravel 5 / Angular project.

I'm trying to add a password reset mechanism to my Laravel 5.0 / AngularJS app. I'm at the step when I need to send an email with a reset link, and am running into the error: View [emails.password] not found.

Since I am using Angular on the front end, I changed my default view path in config/view.php to:

'paths' => [ realpath(base_path('public/app')), ],

When I call sendResetLink() it throws an exception saying: View [emails.password] not found. The stack trace specifically mentions that it cannot find this view in public/app of my project.

I did a bit of research and found out that emails.password corresponds to a blade view located here: laravel/resources/views/emails/password.blade.php

I also know that this view corresponds to the email body.

For some reason, my Laravel project does not have this file so I created it in the public/app directory of my project.

The file that I created is called password.blade.php and has the following code in it:

Click here to reset your password: {{ url('password/reset/'.$token) }}

I'm a newbie with Laravel and don't really know how to register blade views, or even how the view 'emails.password' maps to password.blade.php.

What can I do to resolve this issue? Thanks again.

Upvotes: 0

Views: 1621

Answers (1)

fizz
fizz

Reputation: 66

You need to put that blade file in the directory that Laravel expects it. view('emails.password') in Laravel refers to the password.blade.php file in resources/views/emails/. For example if you wanted to display the view of "profile" profile.blade.php in the users directory resources/views/users/, you would use view('users.profile')

Upvotes: 2

Related Questions