PHP code example of hillus / sin-ticketing-client

1. Go to this page and download the library: Download hillus/sin-ticketing-client 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/ */

    

hillus / sin-ticketing-client example snippets


    $client = App::make('sinticketing');
    $res = $client->storeUsuario([...]);
    return $res;

    $res = SinTicketingClient::login();
    return $res->json()->accessToken;


    $res = SinTicketingClient::storeUsuario([
        "codigo" => 1,
        "nome" => 'Nome',
        "email" => '[email protected]',
        "status" => 'A',
        "permissao" => 'Administrador',
        "grupoEconomico" => null,
        "criadoEm" => Carbon::now()->format('Y-m-d H:i:s'),
        "atualizadoEm" => Carbon::now()->format('Y-m-d H:i:s')      
    ]);

    if($res->status() == 201){
        $this->info($res->json()->id);
    }else if($res->status() >= 400){
        $this->error("erro ao processar usuario");
        dump($res->json());
    }