Is it possible to create a custom login model in laravel as follows:
In the database:
Users (user_id, name)-> containing 10 predefined records (ex: id:1,name:1, id:2,name:2 etc.)
Logins (login_id, password, user_id)
In aplication: To register a client chooses a user from table Users. He then sets a password. Now the application fills the Logins table.
To login a client choses a user from table Users, inputs the password. Now the application does something like:
SELECT login_id, password, user_id FROM Logins WHERE login_id = $id_that_user_choose ORDER BY login_id DESC LIMIT 1;
And check if the password match for the most recent record.
If it is possible how can I do this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire