You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that uses UUIDs as primary keys. The database tables are working fine, but issues arise during login and logout. The package fails to generate UUID values for the primary key, although $table->uuidMorphs('authenticatable') works as expected. It seems the package doesn't fully support UUIDs as primary keys.
this is my my gration schema
Schema::create(config('authentication-log.table_name'), function (Blueprint $table) {
$table->uuid('id')->primary(); // Changed to UUID
$table->uuidMorphs('authenticatable'); // Changed to UUID morphs
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->timestamp('login_at')->nullable();
$table->boolean('login_successful')->default(false);
$table->timestamp('logout_at')->nullable();
$table->boolean('cleared_by_user')->default(false);
$table->json('location')->nullable();
});
when a user login/logout just got error
What’s the solution for this? I’ve tried various approaches, including overriding the model with a custom one, but the issue persists. I’m reaching out for your help and support.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a project that uses UUIDs as primary keys. The database tables are working fine, but issues arise during login and logout. The package fails to generate UUID values for the primary key, although $table->uuidMorphs('authenticatable') works as expected. It seems the package doesn't fully support UUIDs as primary keys.
this is my my gration schema
when a user login/logout just got error
What’s the solution for this? I’ve tried various approaches, including overriding the model with a custom one, but the issue persists. I’m reaching out for your help and support.
Beta Was this translation helpful? Give feedback.
All reactions