InfyOmLabs / laravel-generator

API and Admin Panel CRUD Generator for Laravel.
https://www.infyom.com/open-source
MIT License
3.79k stars 813 forks source link

Folder with Views has hardcoded snake model #421

Closed xaviersand closed 7 years ago

xaviersand commented 7 years ago

Hello,

i don't like snake writing for the views, this is why i changed the stubs, replacing $VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$ with $VIEW_PREFIX$$MODEL_NAME_PLURAL_CAMEL$

The only thing is that the folder name with the views is not being changed. \vendor\infyomlabs\laravel-generator\src\Common\GeneratorConfig.php Line 193 has hardcoded snake:

$this->pathViews = config(
            'infyom.laravel_generator.path.views',
            base_path('resources/views/')
        ).$viewPrefix.$this->mSnakePlural.'/';

this should be parametrable, right ?

mitulgolakiya commented 7 years ago

@xaviersand the only reason of using snake case was, laravel is almost using snake_case everywhere like, magic functions, database fields etc. But if you have your own choice, then you can change it your own way. You can fork the repo and change the line and can use your own repo. And it's not in a near future plan, to have it parameter able. but I would take it in a queue for a future.