PHPackages                             mohamedshuaau/simple-viewable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. mohamedshuaau/simple-viewable

ActiveLibrary[Database &amp; ORM](/categories/database)

mohamedshuaau/simple-viewable
=============================

A simple Laravel package which records eloquent model views

270PHP

Since Sep 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mohamedshuaau/simple-viewable)[ Packagist](https://packagist.org/packages/mohamedshuaau/simple-viewable)[ RSS](/packages/mohamedshuaau-simple-viewable/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Simple Laravel Viewable
-----------------------

[](#simple-laravel-viewable)

This package adds views to your eloquent model. It keeps a record of user visits.

#### Requirements:

[](#requirements)

This package requires Laravel version &gt;= 6.0 and php version &gt;=7.2. There are no dependencies for this package other than Laravel components. This may change in the future.

VersionLaravel Version^1.0^6.0
#### Installation:

[](#installation)

Use composer to download the package

```
composer require mohamedshuaau/simple-viewable

```

Laravel's auto discovery should register the package service provider.

After the installation, you can publish the package content with:

```
php artisan vendor:publish

```

After publishing, you can migrate the table:

```
php artisan migrate

```

In order for your models to be 'viewable', use the trait, `ViewableModel` in your model:

```
