Product support

Get help in the plugin support forum.


Supported features:

  1. Compound primary keys for models
  2. RelationController Extender
    • It extends the Backend\Behaviors\RelationController
    • It fixes the problem with the scope and condition query for relation list

See the Documentation tab for integrating the extensions.

Composite Key in Model

Step 1: just add the trait "\Cyd293\Extenders\Database\Traits\CompositeKey" to your model

Step 2: make your primaryKey in array of composite Keys

Step 3: add another properties $compositeKey this must be the name of composite key

Step 4: add to appends the name that you have inputed in $compositeKey


Model File

class YourModel extends Model {
    use \Cyd293\Extenders\Database\Traits\CompositeKey;

    protected $compositeKey = 'mycomposite';
    protected $appends = ['mycomposite'];
    public $primaryKey = [

Note: to get the composite key value of the model just use the value of the model property $compositeKey Example:

        label: My Composite Key
        type: text

For the RelationBehavior

Step 1: Instead of using "Backend.Behaviors.RelationController" to implement in Controller, use "Cyd293\Extenders\Behaviors\RelationController"

Step 2: add this "\Cyd293\Extenders\Traits\RelationTrait" trait in your controller


class Permission extends Controller
    use \Cyd293\Extenders\Traits\RelationTrait;

    public $implement = [

    public $listConfig = 'config_list.yaml';
    public $formConfig = 'config_form.yaml';
    public $relationConfig = 'config_relation.yaml';


Initialize plugin.

May 17, 2016