PHP code example of mamitech / tikus

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

    

mamitech / tikus example snippets


'providers' => [
    // ...
    Mamikos\Tikus\Facades\TikusFacade::class,
    // ...
],

'aliases' => [
    // ...
    'Tikus' => Mamikos\Tikus\Facades\TikusFacade::class,
],

use Tikus;

...

public function report(Exception $exception)
{
    if ($this->shouldReport($exception)) {
        Tikus::reportException($exception);
    }
    parent::report($exception);
}

use Tikus;

Tikus::reportException($e);

use Tikus;
...
catch (Exception $e)
{
  Tikus::reportException($e);
}

Tikus::reportException(new Exception('Data not found'), [
  'data_id': $data->id
]);

use Tikus;

Tikus::reportError('Info', 'Data is expired');

Tikus::reportError('Info', 'Data is expired', ['expired_at': '2022-07-01 12:59:00']);

// supports nested array
Tikus::reportError('Info', 'My wishlist is', [
  'wishlist': [
    'game': 'overwatch 2',
    'movie': 'topgun: maverick'
  ]
]);