What I have done:
- fresh composer install of CakePHP 4.3.1
bin/cake bake plugin Admin
- config the db connection successfully
bin/cake bake all Articles --plugin Admin
- put this route
$routes->connect('/admin/articles', ['plugin' => 'Admin', 'controller' => 'Articles']);
in theconfig/routes.php
- opened the
plugins/Admin/src/Controller/ArticlesController.php
and change the lineuse App\Controller\AppController;
to theuse Admin\Controller\AppController;
However, after trying to request the admin/articles
route I am getting the 404 error saying Missing controller with description that the Admin.ArticlesController could not be found. Also, the help on the error page suggests to create the controller which is already there, on the exactly same route as suggested.
The plugin is loaded in Application.php ($this->addPlugin('Admin');
) so everything should be fine, so I am confused. What I am doing wrong?