I am attempting to log in using Laravel however I am having some issues
This is how i save my user:
$user = User::create(array('email'=> $_REQUEST['email'], 'password' => encrypt($password), 'firstname'=> $_REQUEST['firstname'], 'lastname'=>$_REQUEST['lastname'], 'unecrypted'=> $password));
Now as you can see i use encrypt($password) this created the following record in my database:
'39', '[email protected]', 'eyJpdiI6Iis5RTRQdjBCV1piSVEwN0ZwRDQxa1E9PSIsInZhbHVlIjoiTnY1UnJ0YkVqZkY0VlhzdWhBK1QzUWxIdTc0SXNBRHlPcHQrcXpicmZHND0iLCJtYWMiOiJhODM2ZDI4ZTE5ZjY5YjlkNmQyOGIyYTdiOTU3NzFkNmNmZWNlOGVhMDNjYjY0ZTFiZjZiOGJlNWM3N2U4MmViIn0=', '2018-01-01 13:45:51', '2018-01-01 13:45:51', NULL, 'Marc', 'Rasmussen'
Which looks correct.
Then i have the following LoginController:
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}
However, when I attempt to login with my password (which I know is correct) I get the following message:
These credentials do not match our records.
Can anyone see what I've done wrong?