1.0.3 • Published 6 years ago

php-call v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

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.
});

License

ISC