Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@HamidNiakan
Copy link

Title: Add make:dto Artisan generator

Summary

Adds a new Artisan generator command php artisan make:dto {Name} which scaffolds a basic DTO class under App\DTOs.
This is intended as a small convenience helper for projects that use DTO objects.

Changes

  • New Console Command: App\Console\Commands\MakeDtoCommand
  • New default stub: stubs/dto.stub
  • Default namespace: App\DTOs
  • Tests: tests/Feature/MakeDtoCommandTest.php (verifies file creation and DTO behavior)

How to test

  1. composer install
  2. ./vendor/bin/pint
  3. php artisan make:dto SampleData
  4. ./vendor/bin/phpunit --filter MakeDtoCommandTest

Notes

  • No breaking changes expected.
  • If maintainers prefer this to live as a community package rather than in framework core, I'm happy to extract it — please advise.
  • cc @taylorotwell (modest ping — please feel free to reassign to maintainers if more appropriate)

Closes: # (if any)

@HamidNiakan
Copy link
Author

Hi — thanks for the review. I noticed this PR was closed with unmerged commits.
Could you please share the reason for closing so I can address it? Was it failing CI, scope/design concerns, or would you prefer this as an external package instead?
I’m happy to make the requested changes and reopen the PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants