remove space in front of php code example
Example 1: remove every whitespace php
$string = preg_replace('/\s+/', '', $string);
Example 2: how to trim string in laravel
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}
$string = preg_replace('/\s+/', '', $string);
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}