Support the ongoing development of Laravel.io →
Authentication Security Session
Last updated 1 year ago.
0

Well your login function should take that user and pass to authenticate.

If your user and pass is in a database you must compare that to the form input and either pass it or fail it.

If it passes show a view and if not go back to the login page.

If you are not using the auth function. are you storing your passwords as clear text?

Last updated 7 years ago.
0

i do not know how to compare username and password of the textbox values. i know the concept of php but do not know how to apply that concept in laravel 5.2

0

If you are not going to use the auth function, then you are not using Laravel 5.2. Then you would do it as if doing procedural programming without the framework.

So you would go something like this if your users is not in a db:

$current_user = 'Mike';
$current_pass = 'Pass';

$user = $request->username; //This is from your form
$pass = $request->password;//This is from your form

If (($current_user == $user) && ($current_pass == $pass)) {
//Do something
}
Last updated 7 years ago.
0

above mentioned link did not work on laravel 5.2. can you paste coding for login in laravel 5.2

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.