I wanna know if it’s possible to call php api like in extjs 3.x.x.
Let me explain, I have a store and I want to get data from php :
Ext.define('KY.store.watcherStore',{
extend: 'Ext.data.Store',
model: 'KY.model.WatcherModel',
proxy: {
type: 'ajax',
url : '/admin/rest/ksThresholdWatcher/loadAllRef',
//reader: {
// type: 'json'
//},
}
});
The url param calls ksThresholdWatcher.php method loadAllRef (I have a php rest api);
but it never calls my php script. I’m stuck, I don’t now how to do, all examples I see set url param like this url:’myPHP.php’.
How can I make it work my way ?
You need to specify that the your proxy is
type: 'rest'in the config. Here is an example the restful way. This also has some good pointers on proxy usage.You can use the
apiproxy config item in 4.x.x to specify different sources for the different request operations (CREATE, UPDATE, DESTROY, READ).