PHP code example of haggag / laravel-visitors

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

    

haggag / laravel-visitors example snippets


protected $middlewareGroups = [
    ...
    'web' => [
        ...
        \Voerro\Laravel\VisitorTracker\Middleware\RecordVisits::class,
    ],
    ...
];

...
'providers' => [
    ...
    Voerro\Laravel\VisitorTracker\VisitorTrackerServiceProvider::class,
    ...
],
...

...
'aliases' => [
    ...
    'VisitStats' => Voerro\Laravel\VisitorTracker\Facades\VisitStats::class,
    ...
],
...

QUEUE_DRIVER=database

VisitStats::routes();

Route::middleware('auth')->prefix('admin')->group(function () {
    VisitStats::routes();
});
bash
php artisan migrate
bash
php artisan vendor:publish
bash
php artisan queue:table
php artisan queue:failed-table
php artisan migrate
bash
php artisan queue:work