@@ -1,54 +1,54 @@  | 
                                                    ||
| 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  | 
                                                        |
| 18 | + // Regular data types:  | 
                                                        |
| 19 | + // string, int, text, bool  | 
                                                        |
| 20 | 20 | |
| 21 | - // Data type modifiers  | 
                                                        |
| 22 | - // required, unique, <numeric-values-for-size>  | 
                                                        |
| 21 | + // Data type modifiers  | 
                                                        |
| 22 | + // required, unique, <numeric-values-for-size>  | 
                                                        |
| 23 | 23 | |
| 24 | - // Special data types:  | 
                                                        |
| 25 | - // parent: requires name of a module, creates a one-to-many relation with the current module  | 
                                                        |
| 26 | - // related: requires name of a module, creates many to many relation with current module  | 
                                                        |
| 24 | + // Special data types:  | 
                                                        |
| 25 | + // parent: requires name of a module, creates a one-to-many relation with the current module  | 
                                                        |
| 26 | + // related: requires name of a module, creates many to many relation with current module  | 
                                                        |
| 27 | 27 | |
| 28 | - 'title' => 'string:128:required',  | 
                                                        |
| 29 | - 'slug' => 'string:128:unique|required',  | 
                                                        |
| 30 | - 'short_description' => 'string',  | 
                                                        |
| 31 | - ],  | 
                                                        |
| 32 | - 'images'=>'single'  | 
                                                        |
| 33 | - ],  | 
                                                        |
| 28 | + 'title' => 'string:128:required',  | 
                                                        |
| 29 | + 'slug' => 'string:128:unique|required',  | 
                                                        |
| 30 | + 'short_description' => 'string',  | 
                                                        |
| 31 | + ],  | 
                                                        |
| 32 | + 'images'=>'single'  | 
                                                        |
| 33 | + ],  | 
                                                        |
| 34 | 34 | |
| 35 | - 'tags' => [  | 
                                                        |
| 36 | - 'data'=>[  | 
                                                        |
| 37 | - 'title' => 'string:128:required'  | 
                                                        |
| 38 | - ]  | 
                                                        |
| 39 | - ],  | 
                                                        |
| 35 | + 'tags' => [  | 
                                                        |
| 36 | + 'data'=>[  | 
                                                        |
| 37 | + 'title' => 'string:128:required'  | 
                                                        |
| 38 | + ]  | 
                                                        |
| 39 | + ],  | 
                                                        |
| 40 | 40 | |
| 41 | - 'posts' => [  | 
                                                        |
| 42 | - 'data' => [  | 
                                                        |
| 43 | - 'author' => 'parent:users',  | 
                                                        |
| 44 | - 'title' => 'string:256:required',  | 
                                                        |
| 45 | - 'slug' => 'string:128:unique|required',  | 
                                                        |
| 46 | - 'short_description' => 'string',  | 
                                                        |
| 47 | - 'full_description' => 'text',  | 
                                                        |
| 48 | - 'category' => 'parent:categories',  | 
                                                        |
| 49 | - 'tags' => 'related:tags'  | 
                                                        |
| 50 | - ],  | 
                                                        |
| 51 | - 'images'=>'multiple'  | 
                                                        |
| 52 | - ],  | 
                                                        |
| 53 | - ]  | 
                                                        |
| 41 | + 'posts' => [  | 
                                                        |
| 42 | + 'data' => [  | 
                                                        |
| 43 | + 'author' => 'parent:users',  | 
                                                        |
| 44 | + 'title' => 'string:256:required',  | 
                                                        |
| 45 | + 'slug' => 'string:128:unique|required',  | 
                                                        |
| 46 | + 'short_description' => 'string',  | 
                                                        |
| 47 | + 'full_description' => 'text',  | 
                                                        |
| 48 | + 'category' => 'parent:categories',  | 
                                                        |
| 49 | + 'tags' => 'related:tags'  | 
                                                        |
| 50 | + ],  | 
                                                        |
| 51 | + 'images'=>'multiple'  | 
                                                        |
| 52 | + ],  | 
                                                        |
| 53 | + ]  | 
                                                        |
| 54 | 54 | ];  | 
                                                        
@@ -12,7 +12,7 @@ discard block  | 
                                                    ||
| 12 | 12 | public function boot()  | 
                                                        
| 13 | 13 |      { | 
                                                        
| 14 | 14 | $this->publishes([  | 
                                                        
| 15 | -            __DIR__ . '/../config/laragen.php' => config_path('laragen.php') | 
                                                        |
| 15 | +            __DIR__.'/../config/laragen.php' => config_path('laragen.php') | 
                                                        |
| 16 | 16 | ], 'config');  | 
                                                        
| 17 | 17 | }  | 
                                                        
| 18 | 18 | /**  | 
                                                        
@@ -21,7 +21,7 @@ discard block  | 
                                                    ||
| 21 | 21 | public function register()  | 
                                                        
| 22 | 22 |      { | 
                                                        
| 23 | 23 | $this->mergeConfigFrom(  | 
                                                        
| 24 | - __DIR__ . '/../config/laragen.php',  | 
                                                        |
| 24 | + __DIR__.'/../config/laragen.php',  | 
                                                        |
| 25 | 25 | 'laragen'  | 
                                                        
| 26 | 26 | );  | 
                                                        
| 27 | 27 | |
@@ -62,7 +62,7 @@ discard block  | 
                                                    ||
| 62 | 62 | ],  | 
                                                        
| 63 | 63 |              $this->getStub('Migration') | 
                                                        
| 64 | 64 | );  | 
                                                        
| 65 | -        file_put_contents($this->laravel->databasePath(). "/migrations/" . date('Y_m_d_His') . "_create_" . strtolower(str_plural($model)) . "_table.php", $migrationTemplate); | 
                                                        |
| 65 | +        file_put_contents($this->laravel->databasePath()."/migrations/".date('Y_m_d_His')."_create_".strtolower(str_plural($model))."_table.php", $migrationTemplate); | 
                                                        |
| 66 | 66 | }  | 
                                                        
| 67 | 67 | |
| 68 | 68 | protected function model($model)  | 
                                                        
@@ -97,6 +97,6 @@ discard block  | 
                                                    ||
| 97 | 97 | |
| 98 | 98 | protected function getStub($type)  | 
                                                        
| 99 | 99 |      { | 
                                                        
| 100 | - return file_get_contents(__DIR__ . "/../resources/stubs/" . $type . ".stub");  | 
                                                        |
| 100 | + return file_get_contents(__DIR__."/../resources/stubs/".$type.".stub");  | 
                                                        |
| 101 | 101 | }  | 
                                                        
| 102 | 102 | }  |