Skip to content

Conversation

@KalimeroMK
Copy link

Removed DB::raw() from pluck() to avoid Query\Expression conversion
Extracted logic into helper methods (shouldTrack(), storePageView()...
Add methods to get data through Analytics facade
create getLast28Days(), getLast3Months(), getLast6Months(), getLastYear(), and getCustomRange() method update controller create route file update model for fillable and cast

…rrors.

Added as date and as count in selectRaw() to ensure pluck() works correctly.
Kept groupBy(DB::raw('DATE(created_at)')) for accurate aggregation by days.
update composer json as well
…getRouteModel()) for better readability.

Improved exception handling – the catch block is now outside of storePageView(), keeping concerns separate.
Optimized conditions – unnecessary checks and redundant logic removed.
Used Laravel’s Str::limit() instead of Str::substr() for better readability.
Used header() method for IP & referer handling – avoids redundant ternary checks
…ar(), and getCustomRange() method update controller create route file update model for fillable and cast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant