An empty string results in false and a string with data results in true. But you are not passing the date right.. so try this instead:
$c = DB::table('campaigns')->where('start_time','like', $mm.'%')
->when($start_date, function ($query) use ($start_date) {
return $query->where('start_time', '>=', $start_date.'%');
})
->when($end_date, function ($query) use ($end_date) {
return $query->where('start_time', '<=', $end_date.' 23:59:59');
})
->get();