Shift with red gradient lettering

array/string Helpers

Laravel
Legacy Code

Convert old array and string helpers into their modern class-based methods.

Before

camel_case('Foo Bar');
ends_with('Foo Bar', 'Bar');
starts_with('Foo Bar', 'Foo');
str_contains($string, 'Bar');
str_plural($string, $count);
array_except($array, ['key']);
array_get($array, 'key');

After

Str::camel('Foo Bar');
Str::endsWith('Foo Bar', 'Bar');
Str::startsWith('Foo Bar', 'Foo');
Str::contains($string, 'Bar');
Str::plural($string, $count);
Arr::except($array, ['key']);
Arr::get($array, 'key');

← Back to the Workbench Tasks

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.