laravel 7 'laravel.password_resets' doesn't exist - php

I am trying to send email to user for forget password using rest API,
here is my controller:
enter image description here
strong text
put when I call this forget function by my Api on postman it gives this error :
'laravel.password_resets' doesn't exist
how can I solve this issue

Please run
php artisan migrate

There is a possibility that your would have dropped the database table.
Php artisan migrate: fresh

Related

Laravel 7: How to edit the message in verification email

I am trying to edit Laravel default email verification message.
I have tried publishing the notification and mail resources.
php artisan vendor:publish --tag=laravel-notifications
php artisan vendor:publish --tag=laravel-mail
New folders called mail and notification were created in resource>views>vendor but I haven't been able to find the file which holds the codes for the message in either of the folders. I found a file that seems like the one in vendor>laravel>framework>src>Illuminate>Auth>Notification which is called VerifyEmail but I'm not sure if I'm suppose to change this file since I couldn't find any article online talking about this file.
My Laravel version is 7.15.0.
Any help would be appreciated as I have tried multiple methods with no success.
Thank you in advance.

Laravel with SQLite doesn't keep Auth data

I have project in Laravel 6 with MySQL database and its working fine. My client wants to use SQLite instead of MySQL database.
So i converted my existing database from database.sql to database.sqlite using following online tool
Online database conversion done here : https://www.rebasedata.com/
https://www.rebasedata.com/convert-mysql-to-sqlite-online
After that i have configured database.sqlite into .env file and into config/database.php file.
Issue : I am not able to go beyond login page. Every time i try to login it redirects me back to login page.
Debug : I reviewed that if I remove Authentication function then i am able to access controller which comes after login.
If I do comment to this line $this->middleware('auth'); following function It starts working.
public function __construct()
{
// $this->middleware('auth');
}
Conclusion : I found that I am not getting any value for $user = Auth::user();
So I think that session is not getting generated and stored correctly with SQLite database
Notes :
I have exported existing database using phpmyadmin and removed all
unnecessary comments from database.sql file.
I converted database.sql file online using this tool
https://www.rebasedata.com/convert-mysql-to-sqlite-online
As per my investigation Auth is not getting generated and stored.
I am using default laravel Auth, I generated that using laravel terminal command.
This setup works fine if I configure project with MySql database.
SQLite database configure Path is correct. I found error of not proper path while configuring it and i solved that.
I have already tested using this commands. : php artisan cache:clear --- php artisan route:cache --- php artisan config:cache --- php artisan view:clear
Any help are appreciated. Thanks in advance.

Why does the payload invalid error appears?

enter image description hereenter image description hereI'm getting a payload invalid error for every artisan command:
![][2]
My application was working fine previously without any error, until I ran the app a few days ago on localhost and this error is shown.
You seem to have an old version of the views. Please, run the following commands and try again:
php artisan cache:clear
php artisan view:clear
The payload invalid issue arises when the blades are of different version and the vendor files are of different version.A simple solution is to copy all the content in your current page and then copy it inside a newly created blade with the same version as of the vendor files.

Fresh-installation laravel project can't access postgresql database but can do php migrate

I already asked a question about this 2 days ago, here are the links
Got "password authentication failed for user" but in pgAdmin 3 its working
But I still didn't get an answer to solve the problem.
So I tried to create a new laravel project, then edit the .env file, check if php artisan migrate can run.
After I run php artisan migrate it's running, so it means that my credentials to PostgreSQL database are correct right? if not it will tell you password authentication failed for user "postgres", but I don't get any error at all, so I go to the next step. Now after I make sure everything is OK i run php artisan make:auth, it's a success without error at all, so I go to the web browser then run the site, I clicked the register / login button, fill the fields, submit then, it's happened again the nightmare
I got this message from the website
SQLSTATE[08006] [7] FATAL: password authentication failed for user "postgres" FATAL: password authentication failed for user "postgres" (SQL: select count(*) as aggregate from "users" where "email" = test#test.com)
Even though php artisan migrate run really well, so I've no idea why it's happening. Is there somebody that ever run into this problem before? or maybe why it's happening?
I already search all keywords that possible to fix this problem, but I can't found the answer, it's really stressed me out.
for the info I'm using:
PostgreSQL 9.6.8
Laravel 5.6
Ubuntu 17.10
Edited: Here is my pg_hba.conf
Check your database.php file in config directory, and check the pgsql array. If accessing DB credential values from .env not worked there, test it by directly putting credentials there. hope it will help. Artisan commands work by accessing the credentials from .env files directly,not from database.php that's why migration worked.
I had a similar problem, my generated password contained the character: '#'. This made it a comment line, ignoring the rest of the password. I just changed my password.

Laravel 5.3 url() function alway print http://localhost

I have just switch to new version of laravel i.e. 5.3 for my new project.
Once I need to send registration mail to my portal customer, where registration mail contains account activation link where this mail is sent using Mail::queue.
I am generating that link using url("activate/$random_string");
and which always prints http://localhost/activate/$random_string_value
but what i wants is,
http://localhost/project/public/activate/$random_string_value
or
http://192.168.0.45/laravel/public/activate/$random_string_value
(above result i am getting till laravel 5.2)
i have set APP_URL value in .env as well and in config/app.php as well,
I have tried php artisan config:clear and php artisan config:cache
Can anybody help me to sort out this issue. I have one possible solution is to use env('APP_URL') to genrate same url.
I think your url need to update like:
url("activate/".$random_string);
Hope this work for you!

Categories