PHP code example of redbox / tracker

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

    

redbox / tracker example snippets


php artisan migrate

    protected $listen = [
        // --
        \Redbox\Tracker\Events\NewVisitorEvent::class => [
            \App\Listeners\NewVisitorListener::class,
        ]
        // --
    ];

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle($event)
    {
        dd($event->visitor);
    }
bash
php artisan vendor:publish --provider="Redbox\Tracker\Providers\TrackerServiceProvider"
bash
php artisan make:listener NewVisitorListener