how to convert string to float in laravel code example Example: string to float php $floatValue = floatval("1.0");