N
N
ninja op op2020-05-03 11:45:37
Laravel
ninja op op, 2020-05-03 11:45:37

How to allow only one registration from one IP address in LARAVEL?

The site has a regular registration via php artisan make:auth ,
I need to check for the presence of users in the database with the same IP Address as the one that is trying to register, if a user with the same IP is in the database, then give an error if not, register.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
Konstantin B., 2020-05-03
@Kostik_1993

Well, there is a registration controller. It has a registration method. There is a validation method, you can still think of something with it.
The only question is why do it?

V
Vyacheslav Plisko, 2020-05-03
@AmdY

Add your rules to RegisterController. It’s just that it’s bad to get tied to adin ip, it’s dynamic and there are all sorts of nats. Add at least a timestamp check to the IP validation, I think that one registration is equal to 5 min-hour-day from one IP.

A
Alexey Zhurbitsky, 2013-06-19
@Ramzai85

SELECT Число, MAX(DATE_FORMAT(дата, '%d.%m.%Y')) GROUP BY Число;

I
IrBisoff, 2013-06-19
@IrBisoff

Select max(`number`), `date` from table group by `date`

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question