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