Laravel Custom Login : Use MD5 hasing

  authentication, eloquent, laravel, md5, php

I’m working on a Laravel project that only requires login (No registration), The Laravel uses an existing user tables (with all user data) which have the password stored with MD5 hashing. when i tried the login using the code below it returns false

Auth::attempt(['Email' => $request->get('Email'), 'Password' =>md5($password)])
  1. Is there any way to use only MD5 hashing for Laravel custom login /change default hashing method to md5 ?

The user table have user_id as primary key so

2.How to get user_id of logined user when Auth::id() is called ?

Source: Ask PHP