コード例 #1
0
ファイル: ReportingRepo.php プロジェクト: jdelise/career_site
 public function setLeadsBySourceGroup()
 {
     return Lead::whereBetween('created_at', [$this->start, $this->end])->where('source_name', 'like', '%Zillow%')->orWhere('source_name', 'like', '%Realtor.com%')->orWhere('source_name', 'like', '%Scheetz%')->orWhere('source_name', 'like', '%Trulia%')->orWhere('source_name', 'like', '%CENTURY21.com%')->orWhere('source_name', 'like', '%VoicePad%')->orWhere('source_name', 'like', '%Live Chat%')->orWhere('source_name', 'like', '%Homefinder.com%')->groupBy('lead_source')->groupBy('lead_type')->get([DB::raw('source_name as lead_source'), DB::raw('lead_acceptance_type as lead_type'), DB::raw('count(*) as count')]);
 }