Route [password.request] not defined. But Auth is in routing [laravel] - laravel

My project crashes on login screen. It tries to get password.request route which it does not see. In routing, there is of course
Auth::routes();
but I did add some other stuff that uses authentication mechanisms. I copied remember password views and controllers from vendors and renamed them to reuse for other purposes.
To be honest I don't even know how to debug missing route. Any help?

You shouldn't have to copy views and controllers from the vendors folder manually if you're doing things with Laravel. Instead run php artisan make:auth in a console. This command will copy the necessary auth blade templates and update your routes/web.php to suit. There is some more info here in the official docs on Laravel authentication.
Also, if you haven't already, you'll need to run migrations by running php artisan migrate in a console. This will create the users and password_resets tables needed to allow registration, login and password recovery.
If you're still having trouble and want to debug things more, make sure you set APP_DEBUG=true inside your .env file in the projects root path. This should record a stack trace in storage/logs/laravel.log when an error occurs.

Related

Is it possible for the laravel web route file accessible in postman software

is it possible for the laravel web route file accessible in postman software
It's not possible out of the box. One could create a route echoing the route file that you desire, but it's not something recommended and would make your application prone to security vulnerabilities.
If, on the other hand, what you need is the list of routes that you application has available, you can use the following command:
php artisan route:list
Make sure your terminal is placed within your project folder before running the command

Laravel App logs out each time i visit a route

There is a problem with my Laravel App, whenever a user logs in it logs the user in.
At this point if i return a view it still stays logged in but if i redirect to any route at all (protected or not), it automatically logs the user out and redirects to login page.
You session and auth guard is not configured properly please check this and also you can use laravel auth package for login/register
So i resolved it following this :
SOLUTION:
Go to your .env file and change SESSION_DRIVER=file to SESSION_DRIVER=database.
Next you will need to create a session migration: php artisan session:table.
Now composer dump-autoload for good practice.
Finally migrate (php artisan migrate).

New Laravel project, /login is forbidden

There are a couple of questions like this, but none of them worked for me.
I have a new project in Laravel. I created new /register route, works perfectly.
But /login is not working. I'm getting 403 Forbidden error and nginx/1.13.3 beneath. I tried adding new .htaccess file in the root of the project and it didn't work.
I have a project that I created couple of months ago, with the same route /login and it still works perfectly, with no .htaccess fine in root.
I'm using Homestead machine as the server and I have Laravel 5.6.1. project.
And, no matter what I do, the same error is still there. I can remove the route, the controller or the view (just to provoke new, familiar error) but still the same one.
Any ideas what is going on?
First, nginx doesn't need an .htaccess file. It exists for apache users in new Laravel projects.
Second, Laravel has the authentication routes builtin, you shouldn't need to create login and register routes. Run:
php artisan make:auth
to scaffold your auth routes and views. Try removing the /register route you created and run the above command.
Just run
php artisan make:auth
and
php artisan migrate
in a fresh Laravel application.
Then, navigate your browser to
http://your-app.dev/register
or any other URL that is assigned to your application. These two commands will take care of scaffolding your entire authentication system!

Laravel File Manager 404 error

I just installed Laravel file manager on my project and I don't understand why I get an NotFoundHttpException when I try to pop up the file manager.
I've installed it in many projects and it's the first time that I get this kind of error.
I already put the LaravelFilemanagerServiceProvider in my providers,
and the service provider is above the RouteServiceProvider
I've tried to clear the route cache, to publish all files etc...
When I do php artisan route:list I have the correct routes with the correct middlewares,
but on my browser impossible to access the file manager,
so with the console the routes appear to be correctly registered, but the browser does not find it
any idea how to proceed ? Thank you for your answers
I found the solution,
I used a pre-made code for the wysiwyg editor coming from Laravel File Manager website but the code was wrong,
Be careful in the "Integration" section, the code is not always correct with the default given configuration.

Set Laravel Application Urls

Fairly new to Laravel here and I'm struggling to understand how to make Laravel 5.2 aware of where it resides. Here's the issue:
I set up auth using php artisan make:auth, and can now see the lovely landing page, as well as login and register links in the menu. The problem is that these links don't go to the right place. They point to /login and /register in the code respectively, which translates into http://localhost/login or http://localhost/register. But since I'm not on a production site yet and am developing locally, my website resides at http://localhost/projectname/public.
I've gone into config/app.php and tried various values for the URL parameter, but these have no effect.
What can I do to get these links to reflect the full site URL, without manually entering it each time?
you can run the development server in laravel using this command
php artisan serve
Did you try that?
Use laravel url function:
{{ url().'/login' }}

Resources