meta ); if ( array_key_exists( $key, $meta ) ){ return $meta[ $key ]; } else { return null; } } function write( $key, $value ){ $meta = unserialize( $this->meta ); $meta[ $key ] = $value; $meta = serialize( $meta ); $this->meta = $meta; $this->save(); } function readRaw(){ return $this->meta; } function writeRaw( $serialized ){ $this->meta = $serialized; $this->save(); } public function getUUID(){ return $this->uuid; } public function setUuid(){ // check if UUID is set if( !isset($this->uuid) || is_null($this->uuid) || $this->uuid === "" ){ $this->uuid = Uuid::uuid4(); return true; } else { return false; } } public function rawUuid( Uuid $uuid ){ $this->uuid = $uuid; $this->save(); } public static function formTable( Blueprint $table ){ $table->uuid('uuid'); $table->text('meta'); } public static function route(){} }