PHP code example of wachey / api

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

    

wachey / api example snippets


$exceptions->report(function (Throwable $e) {
    Report::error($e->getMessage(), $e->getFile(), $e->getLine(), request()->ip(), Auth::check() ? Auth::user()->email : null);
});

Report::error($exception->getMessage(), $exception->getFile(), $exception->getLine(), request()->ip(), Auth::check() ? Auth::user()->email : null);

parent::report($exception);

try {
    // Your code here that may throw an exception
} catch (Exception $e) {
    Report::error($e->getMessage(), $e->getFile(), $e->getLine(), request()->ip(), Auth::check() ? Auth::user()->email : null);
}

define('PUBLIC_HTML_PATH', '/path/to/your/public_html');