I'm developing a system with login and password, using laravel. The registration part was even easy:
public function salvar(){
$usu_email = Request()->input('usu_email');
$usu_senha = Request()->input('usu_senha');
$usu_tipo = Request()->input('usu_tipo');
DB::insert('INSERT INTO usr_usuario (usu_email, usu_senha, usu_tipo) VALUES (?, md5(?), ?)', array($usu_email, $usu_senha, $usu_tipo));
return redirect() ->action('ProjetoController@inicio');
}
But as far as sending the information to the bank and comparing it, I'm a bit confused. In the database I have the following script that will make the comparison:
select usu_codigo,usu_tipo
from usr_usuario
where usu_email=:usu_email
and usu_senha=md5(:usu_senha)
But I do not know how to do in my ProjectController.php to send the information. I think it's something like sending it to the bank on the registration side.