N
N
Nina Fineberg2020-08-15 05:24:53
Laravel
Nina Fineberg, 2020-08-15 05:24:53

How to make Laravel's routing protection similar to User?

Tell me, how can I make the same system as for the User model, for the Client model, only without registration, I want to hide the routes from the client until he has gone through several pages. those. order, and if the client started a new session, I received his email (without a password), I redirect him to the desired page. I can assign a page to it in the database that can be shown to it, but I don’t quite understand how to get exactly the Client model in the middleware as well as user. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2020-08-15
@NinaFFF

In the method, check at which step it stopped. There are records in a DB after each step.

M
Mokhirjon Naimov, 2020-08-16
@zvermafia

I think you need this thing: Adding Custom Guards

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question