-
Notifications
You must be signed in to change notification settings - Fork 109
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
[Proposal] Add artisan command class generators #25
Comments
Hi! More than happy for you to contribute and adding generators to this package would be a great addition. Thanks for your offer of help! It'd be great to work out how this will be implemented. I think having separate generators for each "unit" would be really useful, but it'd also be great (if possible) one command that generates all the units at once. I.e. if you're adding I wasn't entirely sure what Here were some of my other thoughts:
Let me know your thoughts! |
Seems like our implementation thoughts are very well aligned, that makes me happy. :) The
A few thoughts
|
Great! I think for the Eloquent option it would be useful to have the default in the config. The reason being if you are not using Eloquent at all, then it'd be really annoying to always have to provide it to the generator. So maybe there's an
The default namespace (obtained via config) should be In terms of In terms of the config, I don't think there's too many settings in total (unless you disagree!) so maybe keep them under a For info, if you're starting any work on this then it should be branched off the |
I like where this is going!
Let the hacking begin! |
Okay, so now the basic generators have been created and are now working. I'll just finish up some refactoring, and then I'll publish the PR. As of now it only works using eloquent, but I'll post a features list on the PR to track what's missing and what's not. Questions:
This is great fun, a lot of good edge-cases to solve :) |
Great, glad it's fun - this is going to be a fantastic addition, so looking forward to getting it into the package. In answer to your questions:
Hope that helps! |
I agree, generators are such a great tool, and amps up productivity a lot. As you can see I've created a PR, which is not the finished version. Since it's quite a lot of code to take in at once, I thought publishing while in an early state would make it easier for you (or others) to give feedback while in development. Looking forward to hearing what you think. |
Hi! Have seen the pull request but haven't had time to look through it in detail. Will do so today and get back to you! |
Hey @lindyhopchris, the generator is now feature complete and ready to rock! 🎸 I'd love to get your feedback! Even the small things like missing punctuation in docblocks or whatever. I hope you like it so far! |
Hey! Thanks for this - I'll hopefully get a chance to look at it today. |
Merged into Things to do:
|
It will fail. But Laravel gives you an option to merge the users config with the package default config files. PR is here: #28 |
Yeah, I went for the generator using a default value when loading the value from config: Not sure about the merging the config because of the amount of other really application specific config that the |
Sounds super good! I am super excited about seeing my contribution getting merged to develop! Looks like you're about to get ready to release? 🎉 |
Yes, had been thinking I'd get to it today but might be tomorrow now |
Sure thing, don't stress. :) |
Released as |
It's hacktober, and I still have not made any pull-requests. And since I really like your work on this project, I'd love to contribute! Therefore i propose the following feature.
Since Laravel has started to amp up their use of generators significantly version by version, I have been thinking if you're interested in having one or more generators as artisan commands covering creating:
Lingo proposal
php artisan make:api:resource Task --attributes="body,completed" php artisan make:api:schema Task/Schema php artisan make:api:hydrator Task/Hydrator php artisan make:api:request Task/Request php artisan make:api:search Task/Search php artisan make:api:validators Task/Validators
Since it varies where developers want to locate their JSON API related classes e.g:
This could be configured within the config files.
Any feedback is very welcome, and please do tell if you feel like this doesn't fit the project. Because then I'll be extracting this to a separate companion package. :)
The text was updated successfully, but these errors were encountered: