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

Add a page for Commands #52

Closed
dougstjohn opened this issue Jan 6, 2020 · 5 comments
Closed

Add a page for Commands #52

dougstjohn opened this issue Jan 6, 2020 · 5 comments

Comments

@dougstjohn
Copy link
Contributor

Similar to https://docs.statamic.com/addons/classes/commands

@jonassiewertsen
Copy link
Contributor

Is this what you are looking for @dougstjohn ?
https://statamic.dev/cli#commands

There is a dedicated commands page with a link a the bottom, for additional reading on the Laravel docs where you can find good examples on how to create your own commands.

The Statamic addon docs do give a hint on how to register your own commands:
https://statamic.dev/extending/addons#registering-components

Does this feel good to you or are you missing some information to make it even more clear?

@dougstjohn
Copy link
Contributor Author

I can't remember what was on the v2 docs, but I think it had an example Command class to reference.

It'd be nice to be able to do 'php please make:command' to generate a custom command into the Statamic project or Statamic addon. Then extra docs wouldn't be needed since it'd be easy to generate commands just like fieldtypes, widgets, etc.

@duncanmcclean
Copy link
Member

duncanmcclean commented Sep 18, 2020

@dougstjohn Laravel actually provides this for you.

You can run:

php artisan make:command (CommandName)

@jonassiewertsen
Copy link
Contributor

@dougstjohn @damcclean
What would you think about a section on the statamic command page, saying something like "Useful Laravel Commands".

That could make clear in the docs how to create custom commands.
I could create a PR if both of you think it's useful.

@jonassiewertsen
Copy link
Contributor

There has been no feedback, so I will close it for now.

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

No branches or pull requests

3 participants