Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | $modules = [ 'user', 'group', 'role', 'profile' ]; |
||
17 | |||
18 | foreach ($modules as $moduleName) { |
||
19 | $module = Module::where('name', $moduleName)->first(); |
||
20 | $block = $module->blocks->where('label', 'block.general')->first(); |
||
21 | |||
22 | // Field domain |
||
23 | Field::create([ |
||
24 | 'module_id' => $module->id, |
||
25 | 'block_id' => $block->id, |
||
26 | 'name' => 'domain', |
||
27 | 'uitype_id' => uitype('entity')->id, |
||
28 | 'displaytype_id' => displaytype('list_only')->id, |
||
29 | 'sequence' => $block->fields->count(), |
||
30 | 'data' => json_decode('{"module":"domain"}') |
||
31 | ]); |
||
55 |