'How can I make sure that every controller sees DboSource?
There were issues that some controllers are using DboSource methods and I added the
App::uses('DboSource', 'Model/DboSource');
line to the class file of some base controllers from which other controllers are inherited. However, I wonder whether there is a way in Cake to make sure that a class is loaded by every controller. My current solution works, I just intend to improve it. Is this possible? Thanks!
Solution 1:[1]
You can add this to your app/Config/bootstrap.php file and it will be loaded on every request.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ifunk |
