Eloquent Viewable Versions Save

Associate views with Eloquent models in Laravel

v7.0.2

2 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/cyrildewit/eloquent-viewable/compare/v7.0.1...v7.0.2

v7.0.1

1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/cyrildewit/eloquent-viewable/compare/v6.1.0...v7.0.1

v6.1.0

2 years ago

Changed

  • Add support for Laravel 9 (@atmonshi)

v6.0.2

3 years ago

Fixed

  • Revert breaking change of remember method in Views contract. The $lifetime variable has now a default value of null.

v6.0.1

3 years ago

Fixed

  • Revert breaking change of remember method in Views class. The $lifetime variable has now a default value of null.

v6.0.0

3 years ago

Added

  • Added bool return typehint to record method in Views contract.
  • Added void return typehint to destroy method in Views contract.
  • The ViewRecordException will be thrown when trying to record a view for a viewable type.
  • The ViewRecorded event will be fired when a new view is recorded.
  • Added Views typehint to global views() function.
  • Added bool return typehint to isCrawler method in CrawlerDetector contract.

Changed

  • Set required PHP versions in composer.json to ^7.4|^8.0.
  • The creating of the View instance has been moved into its own method protected function createView(): View.
  • The $viewable argument of the forViewable method in Views contract cannot be nullable anymore.
  • Changed the method arguments of orderByViews and orderByUniqueViews query scope in Viewable contract and InteractsWithViews trait.
  • Changed the method arguments of withViewsCount query scope in InteractsWithViews trait.
  • Added nullable Period class typehint to $period argument of period method in Views contract.
  • Made $name argument nullable in Views contract.
  • Changed return typehint of ip method in Visitor contract to ?string.
  • Change DateTime typehint to DateTimeInterface in InvalidPeriod exception.

Removed

  • Removed lifetime_in_minutes option from config file.

Fixed

  • Fixed count method of Views class to count all views, including the collections (#241).

v6.0.0-alpha.1

3 years ago

v5.2.1

3 years ago

Changed

  • Add support for Laravel 8

v5.2.0

4 years ago

Fixed

  • Use CyrildeWit\EloquentViewable\Contracts\Views to resolve Views instance from container.

v5.1.0

4 years ago

Changed

  • Remove default value (null) for viewable in views() helper.