codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.4k stars 1.9k forks source link

Bug in documentation: use statement missing. #7991

Closed rhsboss closed 1 year ago

rhsboss commented 1 year ago

PHP Version

8.1

CodeIgniter4 Version

4.4.1

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

No response

What happened?

A 404 error was displayed after completing the beginner tutorial on the codeigniter.com user guide. https://codeigniter.com/user_guide/tutorial/static_pages.html

Steps to Reproduce

Expected Output

The newly created 'home' and 'about' pages should be displayed as directed in the user_guide.

Anything else?

The solution it found was to add the following line after "use CodeIgniter\Router\RouteCollection;" at the top inside the "config routes.php"

" use App\Controllers\Pages; "

kenjis commented 1 year ago

It is described. Screenshot 2023-09-29 5 46 55 https://codeigniter.com/user_guide/tutorial/static_pages.html#setting-routing-rules

kenjis commented 1 year ago

If you find a bug in the docs, feel free to report it.