laravel-authentication-log icon indicating copy to clipboard operation
laravel-authentication-log copied to clipboard

Added PHPDocs to allow autocompletion in IDE

Open bretto36 opened this issue 2 years ago • 0 comments

Hi There. Thanks for this package, we've just started using it. I saw it was missing PHPDoc blocks for the properties on the model. I like to let me IDE do as much thinking for me as possible.

We had a scenario where our project needed to report on how many people logged in on each day for 3 months and doing $log-> didn't show any values in my IDE. So thought i'd do a PR.

$user->authentications()
        ->where('login_at', '>', Carbon::now()->subMonthsNoOverflow(3))
        ->get()
        ->countBy(function(AuthenticationLog $log) {
            return $log->login_at->timezone(Tenancy::getTenant()->timezone)->format('Ymd');
        });

bretto36 avatar Apr 18 '23 23:04 bretto36