public function cleanLog($maxAgeInMonths)
    {
        $minimumDate = Carbon::now()->subMonths($maxAgeInMonths);
        Activity::where('created_at', '<=', $minimumDate)->delete();

        return true;
    }
public function cleanLog($maxAgeInMonths)
    {
        $minimumDate = Carbon::now()->subMonths($maxAgeInMonths);
        Activity::where('created_at', '<=', $minimumDate)->delete();

        return true;
    }
public function cleanLog ( $ maxAgeInMonths ) { $ minimumDate = Carbon :: now ( ) -> subMonths ( $ maxAgeInMonths ) ; Activity :: where ( 'created_at' , '<=' , $ minimumDate ) -> delete ( ) ; return true ; }
Clean old log records.

@param int $maxAgeInMonths

@return bool
Clean old log records .