Support the ongoing development of →
Authentication Security Session
Last updated 2 years ago.

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.

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


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.

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


Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2024 - All rights reserved.