@@ -313,16 +313,17 @@ Defining a Default Controller
313313
314314Let'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
321321Where ``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
327328If you now browse to your site without specifying any URI segments you'll
328329see the "Hello World" message.
@@ -547,15 +548,16 @@ Defining a Default Controller (Legacy)
547548Let's try it with the ``Helloworld `` controller.
548549
549550To 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
554555Where ``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
560562If you now browse to your site without specifying any URI segments you'll
561563see the "Hello World" message.
0 commit comments