Skip to content

Commit 65cb4d5

Browse files
committed
docs: update config sample
1 parent ad0fb2c commit 65cb4d5

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

user_guide_src/source/incoming/controllers.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -313,16 +313,17 @@ Defining a Default Controller
313313

314314
Let's try it with the ``Helloworld`` controller.
315315

316-
To specify a default controller open your **app/Config/Routes.php**
317-
file and set this variable:
316+
To specify a default controller open your **app/Config/Routing.php**
317+
file and set this property::
318318

319-
.. literalinclude:: controllers/015.php
319+
public string $defaultController = 'Helloworld';
320320

321321
Where ``Helloworld`` is the name of the controller class you want to be used.
322322

323-
A few lines further down **Routes.php** in the "Route Definitions" section, comment out the line:
323+
And comment out the line in **app/Config/Routes.php**:
324324

325325
.. literalinclude:: controllers/016.php
326+
:lines: 2-
326327

327328
If you now browse to your site without specifying any URI segments you'll
328329
see the "Hello World" message.
@@ -547,15 +548,16 @@ Defining a Default Controller (Legacy)
547548
Let's try it with the ``Helloworld`` controller.
548549

549550
To specify a default controller open your **app/Config/Routes.php**
550-
file and set this variable:
551+
file and set this property::
551552

552-
.. literalinclude:: controllers/015.php
553+
public string $defaultController = 'Helloworld';
553554

554555
Where ``Helloworld`` is the name of the controller class you want to be used.
555556

556-
A few lines further down **Routes.php** in the "Route Definitions" section, comment out the line:
557+
And comment out the line in **app/Config/Routes.php**:
557558

558559
.. literalinclude:: controllers/016.php
560+
:lines: 2-
559561

560562
If you now browse to your site without specifying any URI segments you'll
561563
see the "Hello World" message.

user_guide_src/source/incoming/controllers/015.php

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)