Download the PHP package jacobcyl/laravel-counter without Composer
On this page you can find all versions of the php package jacobcyl/laravel-counter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jacobcyl/laravel-counter
More information about jacobcyl/laravel-counter
Files in jacobcyl/laravel-counter
Download jacobcyl/laravel-counter
More information about jacobcyl/laravel-counter
Files in jacobcyl/laravel-counter
Please rate this library. Is it a good library?
Informations about the package laravel-counter
Installation
composer require jacobcyl/view-counter:^2.0
Configuration
add provider
publish config file and migration files
add "use ViewCounterTrait;" to your model
add schedule task
edit app/Console/Kernel.php file's schedule method.add counter:sync command:
run crontab -e then add follow
* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
command
synchronize data to the database
php artisan counter:sync
initialize view counter of specified model
php artisan counter:view product 100 --action=plus // the specified product increased by 100 views
All versions of laravel-counter with dependencies
PHP Build Version
Package Version
No informations.
The package jacobcyl/laravel-counter contains the following files
Loading the files please wait ....