spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Installation steps in documentation - How to prevent "Route [login] not defined" error in Mailcoach Installation #210

Closed connecteev closed 4 years ago

connecteev commented 4 years ago

I was setting up Mailcoach (the package) in an existing laravel 7 project. After going through all the steps here I was met with this error page when I went to http://127.0.0.1:8000/mailcoach

Symfony\Component\Routing\Exception\RouteNotFoundException
Route [login] not defined.

I did try adding Auth::routes(); to my routes/web.php, but I was getting redirected to /login with:

InvalidArgumentException
View [auth.login] not found

The docs need to make it clear that you cannot install mailcoach in a laravel 7 app that does not have auth (login and register) functionality. The way to fix this, as per the laravel docs is:

and then, after you've completed the installation from https://mailcoach.app/docs/v2/package/general/installation-and-setup go to /mailcoach and log in.

freekmurze commented 4 years ago

I think you can solve this by specifying a route that does exist in the redirect_unauthorized_users_to_route of the mailcoach config file.

connecteev commented 4 years ago

Yes, thanks, it would just be good to add both of these options to the documentation, so that others (perhaps me, when I forget in the future!) don't encounter the issue again.