GithubHelp home page GithubHelp logo

Add a page for Commands about docs HOT 5 CLOSED

statamic avatar statamic commented on July 20, 2024
Add a page for Commands

from docs.

Comments (5)

jonassiewertsen avatar jonassiewertsen commented on July 20, 2024

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.

dougstjohn avatar dougstjohn commented on July 20, 2024

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.

duncanmcclean avatar duncanmcclean commented on July 20, 2024

@dougstjohn Laravel actually provides this for you.

You can run:

php artisan make:command (CommandName)

from docs.

jonassiewertsen avatar jonassiewertsen commented on July 20, 2024

@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.

jonassiewertsen avatar jonassiewertsen commented on July 20, 2024

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

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.