$campaign = Campaign::with('keitaros', 'googles')->find(1);
$campaign->keitaros()->join('googles', function($joinClause){
$joinClause->on('googles.campaign_id', '=', 'keitaros.campaign_id')->where('googles.date', '=', 'keitaros.date');
})->selectRaw('SUM(keitaros.income) as keitaros_total_income, SUM(googles.income) as googles_total_income');
function showBrand(Catalog $service) {
return $service->show();
}
class CatalogController extends Controller {
function showBrand(BrandService $brand) {
return $brand->show();
}
function showCity(CityService $city) {
return $city->show();
}
}