PHP code example of kadena-php / laravel

1. Go to this page and download the library: Download kadena-php/laravel 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/ */

    

kadena-php / laravel example snippets


$response = Client::local($signedCommand);

$command = Command::withExecutePayload($payload)
    ->withMetadata($metadata)
    ->make();

$metadata = Metadata::make();

return [
    'api' => [
        'base_url' => env('KADENA_API_BASE_URL', 'http://localhost:8888'),
    ],
    'meta' => [
        'ttl' => 7200,
        'gasLimit' => 10000,
        'chainId' => '0',
        'gasPrice' => 1e-8,
        'sender' => ''
    ],
];
 bash
composer 
bash
php artisan vendor:publish --tag=kadena-config