first of thank you for looking into my problem
I got a bug where even with the right credentials, the authentication returns false. I tested the $request and it worked. The connection to the database also works without flawes.
p.s. I know that the password usually needs to be hashed, I tryed it first with the standard hashing, same result as stated above
used: Laravel 8 Apache MySQL xampp
LoginController.php
public function store(Request $request){
$this->validate($request,[
'email' => 'required|email',
'password' => 'required',
]);
dd(auth()->attempt(['playerMail'=>$request->email,'password'=>$request->password]));
}
Migration of the User
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('playerName');
$table->string('playerMail')->unique();
$table->timestamp('email_verified_at');
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
Model
class User extends Authenticatable
{
use HasFactory, Notifiable;
protected $fillable = [
'playerName',
'playerMail',
'password',
];
protected $hidden = [
'password',
'remember_token',
];
protected $casts = [
'email_verified_at' => 'datetime',
];
}