File tree Expand file tree Collapse file tree
user_guide_src/source/incoming Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -320,16 +320,16 @@ define an array of routes and then pass it as the first parameter to the ``map()
320320Command-Line Only Routes
321321========================
322322
323+ .. note :: It is recommended to use Spark Commands for CLI scripts instead of calling controllers via CLI.
324+ See the :doc: `../cli/cli_commands ` page for detailed information.
325+
323326You can create routes that work only from the command-line, and are inaccessible from the web browser, with the
324327``cli() `` method. Any route created by any of the HTTP-verb-based
325328route methods will also be inaccessible from the CLI, but routes created by the ``add() `` method will still be
326329available from the command line:
327330
328331.. literalinclude :: routing/032.php
329332
330- .. note :: It is recommended to use Spark Commands for CLI scripts instead of calling controllers via CLI.
331- See the :doc: `../cli/cli_commands ` page for detailed information.
332-
333333.. warning :: If you enable :ref:`auto-routing-legacy` and place the command file in **app/Controllers**,
334334 anyone could access the command with the help of Auto Routing (Legacy) via HTTP.
335335
You can’t perform that action at this time.
0 commit comments