Faça uma corda fundida para int php
$num = "3.14";
$int = (int)$num;//string to int
$float = (float)$num;//string to float
Sam
$num = "3.14";
$int = (int)$num;//string to int
$float = (float)$num;//string to float
$id = $user[0]->id;
$int = (int)$id;
$is a string it convert into the in the by last command
$id = DB::table('leave_encash_approval')
->select('id')
->where('company_id',$request->subCompanyId)
->where('year',$request->year)
->get();