CodeIgniter Forums

Full Version: CI 4 4.0.0-beta.3 routing error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I see documentation
If you are building a large application you might want to hierarchically organize or structure your controllers into sub-directories

Directory structure - see attachments

<?php namespace App\Controllers;

use CodeIgniter\Controller;

class UserController extends Controller
public function login()
echo '1';


request:   http://my_domain/admin/usercontroller/login

result: 404 - File Not Found

Routes.php - $routes->setAutoRoute(true);

This don't work, please help fix it;
If "UserController" is in app/Controllers/admin, then its namespace should match. i.e. namespace App\Controllers\admin;