After the ->get() call you will get a collection back with all the SpamLog results. So you then group by the date format, but you never perform a count here.
You probably need something like this
$daily_spam_count = SpamLog::where('timestamp', '>=', $now->subDays(7))
->where('isspam', true)
->get()
->groupBy(function($spamLog) {
return Carbon::parse($spamLog->timestamp)->format('d');
})->map(function ($spamLog) {
return $spamLog->sum();
});
You can probably also do it in one query
$dailySpamCount = SpamLog::select(DB::raw('DATE(timestamp) as date'), DB::raw('count(*) as count'))
->groupBy('date')
->get();