rinvex / laravel-attributes

⚠️ [ABANDONED] Rinvex Attributable is a robust, intelligent, and integrated Entity-Attribute-Value model (EAV) implementation for Laravel Eloquent, with powerful underlying for managing entity attributes implicitly as relations with ease. It utilizes the power of Laravel Eloquent, with smooth and seamless integration.
MIT License
433 stars 104 forks source link

Max length for text attributes #102

Closed msiemens closed 2 years ago

msiemens commented 4 years ago

It seems like text attributes have a max length of 10000 chars:

https://github.com/rinvex/laravel-attributes/blob/4388b9d665b4e98f505b5ea6d7cbc3318be1937c/src/Models/Type/Text.php#L54

MySQL on the other hand has a 2^16 character limit (i.e. 65536 characters) for TEXT columns (as described here.

Could it be possible to either update this limit or make it configurable?

Omranic commented 2 years ago

Thank you for your question. Actually you can control that easily. You can create your own Value Type classes, and register it instead of the default ones. Checkout the docs here https://github.com/rinvex/laravel-attributes#register-your-types

Rinvex Attributes does NOT register any types by default as this is considered implementation details, so it's up to you to register the core types listed above, or extend them and only register your custom types.