PHP code example of mohsen-mhm / laravel-tracking

1. Go to this page and download the library: Download mohsen-mhm/laravel-tracking 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/ */

    

mohsen-mhm / laravel-tracking example snippets


protected $middleware = [
    \MohsenMhm\LaravelTracking\Http\Middleware\TrackRequests::class,
];

'route_url' => 'custom-log-url',

'ip_resolver' => function (Request $request) {
    return $request->header('X-Forwarded-For') ?? $request->ip();
},
bash
   php artisan vendor:publish --tag=tracker-configs
   
bash
   php artisan vendor:publish --tag=tracker-migrations
   
bash
   php artisan migrate
   
bash
   php artisan vendor:publish --tag=tracker-views
   
bash
php artisan vendor:publish --tag=tracker-migrations