how to create a helper class in laravel and use it code example Example: laravel helper use Illuminate\Support\Str; $length = Str::length('Laravel'); // 7