Download the PHP package gadixsystem/visitors without Composer
On this page you can find all versions of the php package gadixsystem/visitors. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gadixsystem/visitors
More information about gadixsystem/visitors
Files in gadixsystem/visitors
Package visitors
Short Description "Simple Laravel Middleware to log vistors and block users"
License MIT
Homepage https://github.com/gadixsystem/visitors
Informations about the package visitors
Visitors (Laravel Package)
Simple visitor middleware for your laravel project with UI and helpers!!
Installation:
From your command line run:
composer require gadixsystem/visitors
Register the provider
In config/app.php add the follow line:
The publish methods
You need to make some migrations: From your command line type:
Now your migrations are in your database/migrations directory.
Run Migrations:
The UI
By default your UI is available in https://yourApp.domain/visitors, but first you need to make 1 more step:
With this command, the views of visitors package are availabe in your resources/views folder (Feel free to customize!).
Config file
But... the permissions ?? No problem with that! The visitors package have a config file to customize your middleware:
Only run:
And new file is appear in your config folder.
-
Dashboard: true/false
-
Prefix: The prefix of visitors UI
-
Middleware: you can add additional middleware to your dashboard.
How to use?
It's very simple, you only need to add visitors middleware to the routes for track:
-
E.g:
Helper
You can make your own dashboard:
- First, add VisitorsHelper to your Controller
-
Methods:
-
VisitorsHelper::getToday();
-
VisitorsHelper::getActive();
-
VisitorsHelper::getBlocked();
-
VisitorsHelper::getTotal();
- VisitorsHelper::graphic();
Test
Run:
-
All versions of visitors with dependencies
phpunit/phpunit Version ~7.0|~8.0|^9.0|^10.0
laravel/framework Version ~5.5|^6.20.42|^7.0|^8.0|^9.0|^10.0