Comments (5)
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?
from docs.
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.
from docs.
@dougstjohn Laravel actually provides this for you.
You can run:
php artisan make:command (CommandName)
from docs.
@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.
from docs.
There has been no feedback, so I will close it for now.
from docs.
Related Issues (20)
- Update static caching rewrite rules for IIS
- Wrong invalidation array nest examples? HOT 1
- Taxonomy Term Repository: Mention the behaviour when you specify/don't specify a `locale` when querying
- Entries Repository: Add example of localizing entry into another site
- Document statically cached 404s
- Document ability to add validation to asset containers
- Document Site `->attribute()` helper
- Document custom logo text feature
- Scope name convention not documented HOT 2
- Document where modifier operators
- Update to Statamic 5
- OAuth docs need updating for Laravel 11
- Document static cache locks
- Glide options missing from docs
- Document Array Fieldtype's "Single" mode
- Document the ability for relationship fieldtypes to provide hints
- Document the ability to specify queue / queue connection when using `static:warm`
- Document Site events
- Document the ability to use text as CP logo HOT 1
- Document the process of building assets for addons HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.