Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested ViewModel doesn't get created under the ViewModels namespace #42

Closed
Wulfheart opened this issue Feb 22, 2022 · 1 comment · Fixed by #43
Closed

Nested ViewModel doesn't get created under the ViewModels namespace #42

Wulfheart opened this issue Feb 22, 2022 · 1 comment · Fixed by #43
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Wulfheart
Copy link

Wulfheart commented Feb 22, 2022

When using the command php artisan make:view-model Game/IndexGamesViewModel a view model gets create under the namespace App\Game instead of App\ViewModels\Game as expected (e.g. compare the make:controller command).

As per https://github.com/spatie/laravel-view-models/blob/main/tests/ViewModelMakeCommandTest.php it is the desired behaviour but what about synchronizing it to other Laravel behaviours?

I'd be willing to contribute this enhancement.

@freekmurze
Copy link
Member

We'd accept a PR that fixes this.

@freekmurze freekmurze added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants