Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP 3 Plugin development controller could not be found error

I am trying to create an admin plugin for my website. I baked plugin then user model and controller but when I visit /admin/users/ or /admin/users/index it always gives an error as below:

Error: Admin.UsersController could not be found.

Error: Create the class UsersController below in file: C:\xampp\htdocs\cake3\plugins\Admin\src\Controller\UsersController.php

But of course I have the files in correct locations. Any ideas what causes this problem?

Thanks a lot for helps or even efforts.

Please ask any further info

like image 772
İsmail Atkurt Avatar asked Apr 14 '26 02:04

İsmail Atkurt


1 Answers

Add this line in config/bootstrap.php

Plugin::load('Admin', ['routes' => true, 'autoload' => true]);
like image 131
Tirthraj Singh Bartwal Avatar answered Apr 15 '26 16:04

Tirthraj Singh Bartwal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!