I have totaled the amount of the production and the amount of claim now I want to divide the claim amount on production (s / p)
public function somsin(){
$sumsin = DB::table('sinistres')
->select(DB::raw('sum(montant_sin) as totalsin'))
->get();
$sumpro = DB::table('productions')
->select(DB::raw('sum(montant_pro) as montant_pro'))
->get();
$toto = $sumsin[0]/$sumpro[0];
return view('test')->with(['sumsin'=>$sumsin, 'sumpro'=>$sumpro, 'toto'=>$toto]);
}
Object of class stdClass could not be converted to number
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2KMGLrc
via IFTTT
Aucun commentaire:
Enregistrer un commentaire