Tag Archives: unserialize

PHP serialization/unserialization in Laravel using Accessors & Mutators

It is a very common use case to store/retrieve array type data to/from the database by using PHP’s serialize/unserialize function. When this data is coming back and forth from JSON format, this 2 functions quickly do the conversion from array to database storable string format and vice versa. In plain PHP code, to get the string just …