NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #5059 most downloaded on Packagist
A package for attaching arbitrary data to Eloquent models
Latest stable
6.3.1
Last release 7 months ago
17 Apr 2026
Release timing varies
gaps range from 2 weeks to 1.2 years
Nearly every release is documented
notes for 31 of 32 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
32 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Fix PHP 8.4 explicit nullable type deprecation by @saulens22 in https://github.com/plank/laravel-metable/pull/112
Full Changelog: https://github.com/plank/laravel-metable/compare/6.3.0...6.3.1
Added support for Laravel 13 by @frasmage in https://github.com/plank/laravel-metable/pull/127
Full Changelog: https://github.com/plank/laravel-metable/compare/6.2.0...6.3.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Laravel 12.x Compatibility by @laravel-shift in https://github.com/plank/laravel-metable/pull/113
Full Changelog: https://github.com/plank/laravel-metable/compare/6.1.0...6.2.0
Fix phpunit deprecations by @skeemer in https://github.com/plank/laravel-metable/pull/108
Full Changelog: https://github.com/plank/laravel-metable/compare/6.0.4...6.1.0
Fix index migration on Postgres by @frasmage in https://github.com/plank/laravel-metable/pull/106
Full Changelog: https://github.com/plank/laravel-metable/compare/6.0.3...6.0.4
fix mysql migration by @frasmage in https://github.com/plank/laravel-metable/pull/104
Full Changelog: https://github.com/plank/laravel-metable/compare/6.0.2...6.0.3
* doc updates Full Changelog: https://github.com/plank/laravel-metable/compare/6.0.1...6.0.2
Full Changelog: https://github.com/plank/laravel-metable/compare/6.0.1...6.0.2
Fix ReadTheDocs documentation generation
Full Changelog: https://github.com/plank/laravel-metable/compare/6.0.0...6.0.1
Deprecated SerializableHandler in favor of the new SignedSerializeHandler datatype. The SerializableHandler will be removed in a future release. In th…
Version 6 contains a number of changes to improve the usability, performance and security of the package. Refer to the UPGRADING.md file for detailed instructions on how to upgrade from version 5.
SignedSerializeHandler as a catch-all datatype, which will attempt to serialize the data using PHP's serialize() function. The payload is cryptographically signed with an HMAC before being stored in the database to prevent PHP object injection attacks.SerializableHandler in favor of the new SignedSerializeHandler datatype. The SerializableHandler will be removed in a future release. In the interim, added the metable.options.serializable.allowedClasses config to protect against unserializing untrusted data.ArrayHandler and ObjectHandler, due to the ambiguity of nested array/objects switching type. These will be removed in a future release. The SignedSerializeHandler should be used instead.PureEnumHandler and BackedEnumHandler which adds support for storing enum values as Meta.StringableHandler which adds support for storing Illuminate\Support\Stringable objects as Meta.DateTimeImmutableHandler which adds support for storing DateTimeImmutable/CarbonImmutable objects as Meta.ModelHandler will now validate that the encoded class is a valid Eloquent Model before attempting to instantiate it during unserialization. If the class is invalid, the meta value will return null.ModelHandler will no longer throw a model not found exception if the model no longer exists. Instead, the meta value will return null. This is more in line with the existing behavior of the ModelCollectionHandler.ModelCollectionHandler will now validate that the encoded collection class is a valid Eloquent collection before attempting to instantiate it during unserialization. If the class is invalid, an instance of Illuminate\Database\Eloquent\Collection will be used instead.ModelCollectionHandler will now validate that the encoded class of each entry is a valid Eloquent Model before attempting to instantiate it during unserialization. If the class is invalid, that entry in the collection will be omitted.getNumericValue(): null|int|float method to HandlerInterface which should convert the original value into a numeric format for indexing, if relevant for the data type.useHmacVerification(): bool method to HandlerInterface which should indicate whether the integrity of the serialized data should be verified with an HMAC.metable:refresh artisan command which will decode and re-encode all meta values in the database. This is useful if you have changed the data type handlers and need to update the serialized data and indexes in the database.whereMeta(), whereMetaIn(), and orderByMeta() query scopes can now leverage a prefix index on the meta.value column. This greatly improves performance when searching for meta values against larger datasets when using applicable operators, e.g. =, %, >, >=, <, <=, <>, LIKE (no leading wildcard). This index is only supported by the 'mysql', 'mariadb', 'pgsql', and 'sqlite' drivers.whereMetaNumeric() and orderByMetaNumeric() query scopes will now scan the indexed numeric_value column instead of the serialized value column. This greatly improves performance when searching for meta values against larger datasets.whereMetaNumeric() query scope will now accept a value of any type. It will be converted to an integer or float by the handler. This is more consistent with the behaviour of the other query scopes.whereMetaInNumeric()whereMetaNotIn()whereMetaNotInNumeric()whereMetaBetween()whereMetaBetweenNumeric()whereMetaNotBetween()whereMetaNotBetweenNumeric()whereMetaIsNull()whereMetaIsModel()whereMeta*Numeric() query scope to a numeric value, then an exception will be thrown.$castMeta property or castMeta(): array method on the model. This is similar to the casts property of Eloquent Models used for attributes. All cast types supported by Eloquent Models are also available for Meta values.Values will be cast before values are stored in the database to ensure that they are indexed consistentlymergeMetaCasts() method which can be used to override the defined cast on a meta key at runtime.setMetaEncrypted() method which will encrypt data before storing it in the database and decrypt it when retrieving it. This is useful for storing sensitive data in the meta table.encrypted: will automatically encrypt all values for that meta key.MetableAttributes which can further extend the Metable trait allowing access to meta values as model attributes using a meta_ prefix. This can be useful for type hinting, IDE autocompletion, static analysis, and usage in Blade templates.$meta->numeric_value attributes, which are used for optimizing queries filtering by meta value$meta->hmac attribute, which is used by some data type handlers to validate that the payload has not been tampered with.$meta->raw_value virtual attribute, which exposes the raw serialized value of the meta key. This is useful for debugging purposes.encrypt() method, used internally by the Metable::setMetaEncrypted() methodFull Changelog: https://github.com/plank/laravel-metable/compare/5.4.0...6.0.0
feat: support laravel 10 by @GeoSot in https://github.com/plank/laravel-metable/pull/94
Full Changelog: https://github.com/plank/laravel-metable/compare/5.3.1...5.4.0
Fix:Respect Metable model connection, while trying to save many meta by @GeoSot in https://github.com/plank/laravel-metable/pull/91
getAllMeta will not throw exception in case we haven't set defaultMetaValues property by @GeoSot in https://github.com/plank/laravel-metable/pull/92Full Changelog: https://github.com/plank/laravel-metable/compare/5.3.0...5.3.1
Add some return types & typed properties by @GeoSot in https://github.com/plank/laravel-metable/pull/87
Metable interface by @GeoSot in https://github.com/plank/laravel-metable/pull/88Full Changelog: https://github.com/plank/laravel-metable/compare/5.2.1...5.3.0
fixed pinned composer version of phpoption library (Thanks @aneesdev)
Added support for Laravel 9.0. (Thanks @LeoColomb)
Metable models.Fix serialization of Metable models breaking the internal meta index
Metable models breaking the internal meta indexgetAllMeta() now includes default values if the key is not defined.
getAllMeta() now includes default values if the key is not defined.Fix backwards compatibility of getAttributesForInsert in setManyMeta()
setManyMeta()Fixed setManyMeta() not properly serializing certain types of data.
setManyMeta() not properly serializing certain types of data.New schema migration: improved database indexing. See UPGRADING.md for details.
meta.applyMigrations. When set to false, migration paths will not be loaded from the package. Use this if you wish to override the default schema migrations provided with the package.setManyMeta() to bulk insert/update multiple keys to a model. Requires Laravel 8.0+ for optimal performance.removeManyMeta() to bulk delete multiple keys from a modelremoveMeta() method causing an error if called with a non-existent keysetMeta() creating duplicates in the cached meta relation when updating a key.Added support for defining default meta values within a Metable model (Thanks @Braunson!)
Metable model (Thanks @Braunson!)fixed support for Laravel 8.0 migration squashing
Added support for Laravel 8.0 (Thanks @saulens!)
Fixed array unpacking issue when queuing Metable models
Added Laravel 7.0 support (Thanks @saulens22!)
joinMetaTable function now uses getMorphClass for Metable trait to assist with single table inheritance (Thanks @mbryne!)
Minimum requirements updated to PHP 7.2 and Laravel 5.6
whereDoesntHaveMeta() query scope (Thanks @tormjens!)Added whereDoesntHaveMeta() query scope (Thanks @tormjens!)
whereDoesntHaveMeta() query scope (Thanks @tormjens!)Added Laravel 5.5 package autodiscovery
Fixed some compatibility bugs with MySQL
Removed illegal default from value column in migration
Added Laravel 5.4 compatibility
Nothing published for this version
One column per quarter.