php-call
v1.0.3
Published
Allow you to call php functions from browser (work with Saphir php framework).
Downloads
4
Readme
PHP Call
Allow you to call php functions from browser (work with Saphir php framework).
Installation
Download and install npm at www.npmjs.com/get-npm if you haven't already.
npm install php-call
This package is provided in ES6 module format.
Usage
import Php from 'php-call';
// Give the CSRF Token
Php.csrfToken = '........';
Php.call('Namespace\\ControllerName#methodName',
[
// Params of the php method in array
]);
// If the php method return something, do :
Php.call('Namespace\\ControllerName#methodName',
[
// Params of the php method in array
], data =>
{
// Data is the return of the php method.
});