@@ -1,57 +1,57 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return [ |
4 | - 'options' => [ |
|
5 | - 'generated_by_default' => ['migration', 'controller', 'model'], |
|
6 | - 'override' => true |
|
7 | - ], |
|
8 | - 'modules' => [ |
|
4 | + 'options' => [ |
|
5 | + 'generated_by_default' => ['migration', 'controller', 'model'], |
|
6 | + 'override' => true |
|
7 | + ], |
|
8 | + 'modules' => [ |
|
9 | 9 | |
10 | - // optional parameters : |
|
11 | - // 'multiple'=>[] |
|
12 | - // 'images'=>'single' //Images type: single, multiple |
|
10 | + // optional parameters : |
|
11 | + // 'multiple'=>[] |
|
12 | + // 'images'=>'single' //Images type: single, multiple |
|
13 | 13 | |
14 | - 'categories' => [ |
|
15 | - 'data'=> [ |
|
16 | - // Separated by ':', numeric value represents size of the field its 192 by default and is optional |
|
14 | + 'categories' => [ |
|
15 | + 'data'=> [ |
|
16 | + // Separated by ':', numeric value represents size of the field its 192 by default and is optional |
|
17 | 17 | |
18 | - // Regular data types: |
|
19 | - // string, int, text, bool, date |
|
18 | + // Regular data types: |
|
19 | + // string, int, text, bool, date |
|
20 | 20 | |
21 | - // Data type modifiers |
|
22 | - // unique |
|
21 | + // Data type modifiers |
|
22 | + // unique |
|
23 | 23 | |
24 | - //Must start with data type nd then followed by size, then by modifiers if required |
|
24 | + //Must start with data type nd then followed by size, then by modifiers if required |
|
25 | 25 | |
26 | - // Special data types: |
|
27 | - // parent: requires name of a module, creates a one-to-many relation with the current module |
|
28 | - // related: requires name of a module, creates many to many relation with current module |
|
26 | + // Special data types: |
|
27 | + // parent: requires name of a module, creates a one-to-many relation with the current module |
|
28 | + // related: requires name of a module, creates many to many relation with current module |
|
29 | 29 | |
30 | - 'title' => 'string:128', |
|
31 | - 'slug' => 'string:128:unique', |
|
32 | - 'short_description' => 'string', |
|
33 | - ], |
|
34 | - 'images'=>'single' |
|
35 | - ], |
|
30 | + 'title' => 'string:128', |
|
31 | + 'slug' => 'string:128:unique', |
|
32 | + 'short_description' => 'string', |
|
33 | + ], |
|
34 | + 'images'=>'single' |
|
35 | + ], |
|
36 | 36 | |
37 | - 'tags' => [ |
|
38 | - 'data'=> [ |
|
39 | - 'title' => 'string:128' |
|
40 | - ] |
|
41 | - ], |
|
37 | + 'tags' => [ |
|
38 | + 'data'=> [ |
|
39 | + 'title' => 'string:128' |
|
40 | + ] |
|
41 | + ], |
|
42 | 42 | |
43 | - 'posts' => [ |
|
44 | - 'data' => [ |
|
45 | - 'author' => 'parent:users', |
|
46 | - 'title' => 'string:256', |
|
47 | - 'slug' => 'string:128:unique', |
|
48 | - 'short_description' => 'string', |
|
49 | - 'full_description' => 'text', |
|
50 | - 'category' => 'parent:categories', |
|
51 | - 'posted_at' => 'datetime', |
|
52 | - 'tags' => 'related:tags' |
|
53 | - ], |
|
54 | - 'images'=>'multiple' |
|
55 | - ], |
|
56 | - ] |
|
43 | + 'posts' => [ |
|
44 | + 'data' => [ |
|
45 | + 'author' => 'parent:users', |
|
46 | + 'title' => 'string:256', |
|
47 | + 'slug' => 'string:128:unique', |
|
48 | + 'short_description' => 'string', |
|
49 | + 'full_description' => 'text', |
|
50 | + 'category' => 'parent:categories', |
|
51 | + 'posted_at' => 'datetime', |
|
52 | + 'tags' => 'related:tags' |
|
53 | + ], |
|
54 | + 'images'=>'multiple' |
|
55 | + ], |
|
56 | + ] |
|
57 | 57 | ]; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | class BaseGenerator |
8 | 8 | { |
9 | - protected $module; |
|
9 | + protected $module; |
|
10 | 10 | |
11 | 11 | public function getModule() |
12 | 12 | { |