laravel convert true to integer code example Example: php boolean to string $converted_res = $res ? 'true' : 'false';