'array', ]; public function getIncrementing(): bool { return ! $this->usesUuidPrimaryKey(); } public function getKeyType(): string { return $this->usesUuidPrimaryKey() ? 'string' : 'int'; } public function uniqueIds(): array { return $this->usesUuidPrimaryKey() ? [$this->getKeyName()] : []; } protected function usesUuidPrimaryKey(): bool { if (! Schema::hasTable($this->getTable())) { return false; } $column = collect(DB::select(sprintf('SHOW COLUMNS FROM `%s` LIKE "id"', $this->getTable())))->first(); return $column && str_starts_with(strtolower((string) $column->Type), 'char(36)'); } }