PHP code example of codeskop / codeskop-php

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

    

codeskop / codeskop-php example snippets




\Codeskop\Codeskop::init(['api_key' => getenv('CODESKOP_API_KEY')]);
\Codeskop\Codeskop::setRoute('/orders/{id}'); // optional: name the route of this request

use Codeskop\Codeskop;

Codeskop::captureException($e, tags: ['provider' => 'stripe']);
Codeskop::captureMessage('Payout batch skipped');
Codeskop::setUser((string) $user->id); // your own ID, never an email

$stack = \GuzzleHttp\HandlerStack::create();
$stack->push(\Codeskop\Guzzle\Middleware::create());
$http = new \GuzzleHttp\Client(['handler' => $stack]);
bash
composer 
bash
php artisan vendor:publish --tag=codeskop-config