I've created a simple datasource
:
// app/Model/Datasource/FeedSource.php
App::uses('DataSource', 'Model/Datasource');
class FeedSource extends DataSource {
public function abcd() {
echo 'Hello World!';
}
}
in my database.php
:
public $feed = array(
'datasource' => 'FeedSource'
);
And in Feeda
model:
class Feeda extends AppModel {
public $useTable = false;
public $useDbConfig = 'feed';
}
in list
controller:
$this->loadModel('Feeda');
$this->Feeda->abcd();
But, it returns a fatal error:
Error: Call to undefined method FeedSource::query()
How to resolve it?
Thanks...