问题
I am building an app which has two types of users, sellers and buyers. Both sellers and buyers have different pages and forms for their registration. I have built the logic for registration of both users and that is working fine.
How can I write the logic for their login. I am confused between those guard and providers. How should I proceed. It would be nice if you share some tutorial or provide the steps to do this. Thanks
回答1:
What you are asking requires a lot of documenting the answer and investment of time (which I don't have at this moment). I recommend going though the Laravel Custom Guards.
Also, to give you a head start, check out this video Configuring Multi Auth Middleware on YouTube. I was able to build multi-auth after going through this video.
来源:https://stackoverflow.com/questions/58797261/how-to-write-custom-login-function-in-laravel