Best laravel framework open-source packages.

Metadata

A CakePHP plugin that provides arbitrary metadata storage for model records
Updated 1 year ago

Metadata Plugin for CakePHP 2.0+

Metadata provides storage of arbitrary n-deep arrays of data related to a particular model record

Installation

  • Clone/Copy the files in this directory into app/plugins/metadata

  • Include the metadata behavior in the models you wish to have metadata: var $actsAs = array('Metadata.Metadata' => array( 'validate' => array( 'fieldName' => array( 'rule' => 'postal', 'message' => 'Must be valid postal code', ), 'some' => array( 'nested' => array( 'array' => array( array( 'rule' => 'numeric', 'message' => 'Must be numeric' ), array( 'rule' => array( 'decimal', 2 ), 'message' => 'Must be decimal' ) ) ) ) ) ));

  • Define any validation rules that you need, in a similar fashion to model validation rules (all the built-in Validator rules work). Multiple rules per node are supported, and nodes can be as deep as required.

Documentation

Further documentation including additional ways of configuring Metadata can be found here.

Reporting issues

If you have any issues with Metadata please open a ticket on the github issue tracker

Contributing

If you'd like to contribute to Metadata, feel free to fork the project and submit patches!

Tags storage php