Download the PHP package jm-inc/laravel-viewable without Composer
On this page you can find all versions of the php package jm-inc/laravel-viewable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jm-inc/laravel-viewable
More information about jm-inc/laravel-viewable
Files in jm-inc/laravel-viewable
Download jm-inc/laravel-viewable
More information about jm-inc/laravel-viewable
Files in jm-inc/laravel-viewable
Vendor jm-inc
Package laravel-viewable
Short Description A simple Laravel 8 package to count views for models.
License MIT
Package laravel-viewable
Short Description A simple Laravel 8 package to count views for models.
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-viewable
Laravel Viewable
A simple Laravel 8 package to count views for models.
Installation
Setup
- Add this trait
JM\Viewable\InteractsWithViews
to the model you want to count views for. - In your
show
controller method, use$model->viewed()
to count a view. - If the primary key of your model is not
id
set$viewable_id = 'primary-key
in your model.
Example
Your model should look like this:
Your show
route method should look like this:
All versions of laravel-viewable with dependencies
PHP Build Version
Package Version
Requires
hisorange/browser-detect Version
^4.4
The package jm-inc/laravel-viewable contains the following files
Loading the files please wait ....