can I use a model in bootstrap.php to get an array with find() from database ?
like this :
$Setting = ClassRegistry::init('Setting');
$Settings = $Setting->find('all');
thanks
You need to manually load the used classes then, if you really must use core internal stuff that early.
try
App::uses('ClassRegistry', 'Utility');
before you actually use ClassRegistry.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With