dog-ears / crud-d-scaffold

Other
19 stars 4 forks source link

feature improvement: add soft delete, etc #8

Closed ngutip closed 8 years ago

ngutip commented 8 years ago

i think this package will be better with

or above all, you can use file to generate all of those feature

{
    "schema":[
        "SchemaName":[
            "input_filed_name:integer:required:unique",
            "textarea_filed_name:text:required",
            "file_filed_name:string",
            "image_field_name:string"
        ]
    ],
    "model":[
        "ModelName": {
            "namespace": "Name/Space/Models",
            "path": "app/Path",
            "relation":[
                "Relation1:belongsToMany(\App\Models\Relation1::class, 'rel2', 'rel1_id',
                "Relation2:hasMany(\App\Models\Relation2::class, 'rel1_id', 'id','rel2_id')",
                "Another_relation:hasManyThrough(\App\Models\AnotherModel::class, 'a', 'b', 'c')"
        }
    ],
    "controller":[
        "ControllerName":{
            "namespace": "Name/Space/Controller",
            "path": "app/Path"
        }
    ],
    "view":{
            "input_field_name": "email",
            "textarea_filed_name": "wyswyg",
            "file_filed_name": "file",
            "image_field_name": "image"
    }
}

thank you, for allowing me to post improvement request.

dog-ears commented 8 years ago

Thank you for your comment. I reply your proposals one by one.

(ii) soft delete option I accept this feature with middle level priority. I'll add this feature later.

(iii) custom namespace Sorry.I can't accept this feature.

Laravel may not be on "Convention over Configuration" policy. but I think "Convention over Configuration" policy make development more simply and easily like "ruby on rails".

(iv) validation I accept some validation with low level priority. ex.

(v) more relationship type well...To be honest, I'm not familier with other relationship type like many to many relation. And I think most application needs one to many relationship instead of many to many relationship. I accept..but, this feature is low level priority,sorry.

(vi) more input type field in view I accept this feature with middle level priority. I'll add feature later.

(vii) individual generator for schema, model, controller and view Sorry.I can't accept this feature.

Artisan has that feature tentatively. If we need individual model, we should use "make:model" Artisan command.

That's all. I hope you will understand my response for your proposals.

Now, I'm developing test feature for continuous integration. After that, I'll develop some feature in order of priority.

Thank you.

ngutip commented 8 years ago

thank you for you response, i look forward and happy to test it.