Skip to content

Instantly share code, notes, and snippets.

@makamo
Created June 10, 2015 19:35
Show Gist options
  • Save makamo/d57621d21cea561d9eaf to your computer and use it in GitHub Desktop.
Save makamo/d57621d21cea561d9eaf to your computer and use it in GitHub Desktop.
$paie = $this->Paies->get($id, [
'contain' => [
'Contrats.Entreprises.Pays',
'Contrats.Entreprises.Provinces',
'PaieHeures'=> function (Query $q) {
debug($q->select(['date', "h_payable"=>$q->func()->sum('h_payable'), 'fonction_id', 'task_id','taux_reg'])->order(['date']));
die();
},
'PaieHeures.Fonctions',
'PaieHeures.Equipements',
'PaieMetrages',
'Employees',
]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment