PHP code example of uspdev / webservice

1. Go to this page and download the library: Download uspdev/webservice library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

uspdev / webservice example snippets


use Uspdev\Webservice\Auth;

Auth::salvarUsuario(['username'=>'admin', 'pwd'=>'admin', 'admin'=>'1', 'allow'=>'']);
Auth::salvarUsuario(['username'=>'gerente', 'pwd'=>'gerente', 'admin'=>'0', 'allow'=>'*']);
Auth::salvarUsuario(['username'=>'user1', 'pwd'=>'user', 'admin'=>'', 'allow'=>'minhaclasse1']);
Auth::salvarUsuario(['username'=>'user1', 'allow'=>'minhaclasse1, minhaclasse2']); // alterando o usuário user1
Auth::removerUsuario(['username'=>'gerente']);
Auth::listarUsuarios();