Associate views with Eloquent models in Laravel
Full Changelog: https://github.com/cyrildewit/eloquent-viewable/compare/v7.0.1...v7.0.2
Full Changelog: https://github.com/cyrildewit/eloquent-viewable/compare/v6.1.0...v7.0.1
bool
return typehint to record
method in Views
contract.void
return typehint to destroy
method in Views
contract.ViewRecordException
will be thrown when trying to record a view for a viewable type.ViewRecorded
event will be fired when a new view is recorded.Views
typehint to global views()
function.bool
return typehint to isCrawler
method in CrawlerDetector
contract.composer.json
to ^7.4|^8.0
.View
instance has been moved into its own method protected function createView(): View
.$viewable
argument of the forViewable
method in Views
contract cannot be nullable anymore.orderByViews
and orderByUniqueViews
query scope in Viewable
contract and InteractsWithViews
trait.withViewsCount
query scope in InteractsWithViews
trait.Period
class typehint to $period
argument of period
method in Views
contract.$name
argument nullable in Views
contract.ip
method in Visitor
contract to ?string
.DateTime
typehint to DateTimeInterface
in InvalidPeriod
exception.lifetime_in_minutes
option from config file.count
method of Views
class to count all views, including the collections (#241).