Como converta a string para int no evento de função Laravel

$num = "3.14";
$int = (int)$num;
$float = (float)$num;
Mohamad