Skip to content

Instantly share code, notes, and snippets.

@llavillaccama
Created September 1, 2015 20:34
Show Gist options
  • Save llavillaccama/4d9cbe4159bcc912cbaf to your computer and use it in GitHub Desktop.
Save llavillaccama/4d9cbe4159bcc912cbaf to your computer and use it in GitHub Desktop.
Table 01 (options)
op-id name
---------------
1 name 1
2 name 2
3 name 3
Table 2 (license)
lic-id name
---------------
1 test 1
2 test 2
Table 3 (options-licenses)
lic-id op-id
--------------------
1 2
1 3
2 1
<?php
//edit license 1
$options = Options::find()->all();
foreach ($options as $value) {
echo $form->field($value, 'op-id')->checkBox(['label' =>$value['name']]);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment