PHP code example of tatter / visits

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

    

tatter / visits example snippets


class Filters extends BaseConfig
{
    public $globals = [
        'after' => ['visits'],
    ];
...

// app/Config/Filters.php

class Filters extends BaseConfig
{
    public $globals = [
        'before' => [
            'csrf',
        ],
        'after' => [
            'visits',
        ],
    ];

    // ...
}

public static function transform(Visit $visit, IncomingRequest $request): ?Visit;

use App\Transformers\AnonymousTransformer;

class Visits extends BaseConfig
{
    public array $transformers = [
        AnonymousTransformer::class,
    ];
}