PHP code example of d-andreevich / fireblocks-sdk-laravel

1. Go to this page and download the library: Download d-andreevich/fireblocks-sdk-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/ */

    

d-andreevich / fireblocks-sdk-laravel example snippets


use FireblocksSDK;

$result = FireblocksSDK::get_gas_station_info();

Route::post('/fireblocks/webhook/events', function (\Illuminate\Http\Request $req) {

    $object = \FireblocksSdkLaravel\Types\WebHook\Events\FactoryEvent::get(...$req->all());

    return response()->json((array)$object);
})->middleware([\FireblocksSdkLaravel\Http\Middlewares\EventMiddleware::class]);

Route::post('/fireblocks/webhook/notifications', function (\Illuminate\Http\Request $req) {

    $object = new \FireblocksSdkLaravel\Types\WebHook\Notifications\Notification(...$req->all());

    return response()->json((array)$object);
})->middleware([\FireblocksSdkLaravel\Http\Middlewares\NotificationMiddleware::class]);

php artisan vendor:publish --provider="FireblocksSdkLaravel\FireblocksServiceProvider" --tag=config