Allow socialite user model customization by passing the model class to the plugin configuration.
Example:
Customize migration to using UUID as the primary key.
return new class extends Migration
{
public function up()
{
Schema::create('socialite_users', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('user_id');
$table->string('provider');
$table->string('provider_id');
$table->timestamps();
$table->softDeletes();
$table->unique([
'provider',
'provider_id',
]);
});
}
public function down()
{
Schema::dropIfExists('socialite_users');
}
};
Extend the sociallite user
class SocialiteUser extends ModelsSocialiteUser
{
use HasUuids, SoftDeletes;
}
Allow socialite user model customization by passing the model class to the plugin configuration.
Example:
Customize migration to using UUID as the primary key.
Extend the sociallite user
Pass the model class in the plugin configuration